Commit graph

12 commits

Author SHA1 Message Date
Con Kolivas 232b268367 Fix file size recording in the magic header when stdin is used. 2010-11-01 19:18:20 +11:00
Con Kolivas 43dd72b9e1 Do real stdin without the stupid temporary files by mmapping into anonymous ram. 2010-11-01 16:45:48 +11:00
Con Kolivas 49336a5e87 Update magic header info.
Move offset check to after reading chunk width.
Realloc instead of free and malloc.
2010-11-01 15:27:35 +11:00
Con Kolivas 1ed2ce423f Change the byte width to be variable depending on chunk size, and write it as a single char describing the next byte width for decompression.
More minor tidying.
2010-11-01 13:28:49 +11:00
Con Kolivas 3a22eb09b3 Fix output to work correctly to screen when stdout is selected.
Make stdout write directly to stdout on decompression without the need for temporary files since there is no need to seek backwards.
Make file testing not actually write the file during test.
More tidying up.
2010-11-01 11:18:58 +11:00
Con Kolivas a9ad1aef0e Start cleaning up all the flag testing with neat macros. 2010-11-01 04:53:53 +11:00
Con Kolivas 2bacbc60d2 We were attempting to truncate mmap to page size when only the offset needed to be.
Fix the longstanding limit on 32 bits that allowed us to allocate only 2GB of ram by moving the big malloc calls to mmap equivalents which allow us to mmap up to 2^44 bytes of anonymous space.
Use progressively smaller preallocation to try and defragment ram prior to real mmap call to increase success rate of allocating ram when it's a significant proportion of total ram.
Don't fail if preallocation is unsuccessful.
Add more detailed error reporting.
Minor cleanups.
2010-11-01 00:19:39 +11:00
Con Kolivas 19c2769061 Fix the page size rounding for mmap to work properly. 2010-10-31 17:02:12 +11:00
Con Kolivas 8d9b64e1ec Change byte width to be dependant on file size.
This will increase speed of compression and generate a smaller file, but not be backward compatible.
Tweak the way memory is allocated to optimise chances of success and minimise slowdown for the machine.
fsync to empty dirty data before allocating large ram to increase chance of mem allocation and decrease disk thrash of write vs read.
Add lots more information to verbose mode.
Lots of code tidying and minor tweaks.
2010-10-31 15:09:05 +11:00
Con Kolivas c5da3a1adb Add more robust checking.
Premalloc ram to improve early detection of being unable to allocate that much ram.
Make sure to always make chunk size a multiple of page size for mmap to work.
Begin changes to make variable byte width offsets in rzip chunks.
Decrease header entries to only 2 byte wide as per original rzip.
Random other tidying.
2010-10-31 10:35:04 +11:00
Con Kolivas d972496aa8 Make messages come via stdout instead of stderror courtesy of Alexander Saprykin 2010-04-25 16:26:00 +10:00
Con Kolivas 6dcceb0b1b Initial import 2010-03-29 10:07:08 +11:00