Commit graph

71 commits

Author SHA1 Message Date
Con Kolivas 326cd29dd1 Increase version number to 0.571 signifying the mostly low-risk bugfix nature of all the changes (except for the new build system). 2011-03-07 21:13:31 +11:00
Con Kolivas 13a6fb5b43 Dump the temporary file generated to emulate stdout at the end of each chunk on decompression and then truncate the file instead of writing the whole file before dumping it. 2011-03-07 17:14:07 +11:00
Con Kolivas 38eca38743 Unify maxram allocation and limit threads when there isn't enough ram. 2011-03-07 13:23:14 +11:00
Con Kolivas 5eaa1cc42b Updated autotools/conf system courtesy of Michael Blumenkrantz <mike@zentific.com>. 2011-02-27 00:17:29 +11:00
Con Kolivas 8bdd5688c8 Check for free space before compression/decompression and abort if -f option is not enabled. 2011-02-26 23:10:28 +11:00
ckolivas e337cce320 Increment version to 0.570. 2011-02-25 10:16:58 +11:00
ckolivas f9f880908c Remove the slightly fragile exponential growth buffer size.
It was only speeding up compression a small amount, yet adversely affected compression and would segfault due to the size not being consistent on successive passes.
2011-02-25 10:10:22 +11:00
Con Kolivas a0ab78ba8d Update lrzip.conf parser to respect -U, -H, -T, k, and -c options.
Further updates to documentation.
Changes by Peter Hyman <pete@peterhyman.com>
2011-02-24 03:07:57 +11:00
Con Kolivas 94673d3fe3 Change the LZO testing option to be a bool on/off instead of taking a confusing parameter.
Make the lzo testing message simpler and only appear when max verbose mode is enabled.
2011-02-23 01:15:18 +11:00
Con Kolivas a8065f2b86 Update version to 0.561. 2011-02-22 20:42:50 +11:00
Con Kolivas 9c8b1ee795 Deprecate the -M option as it is no longer of any significant utility compared to the -U option. 2011-02-22 20:38:39 +11:00
Con Kolivas 011344753a With lzma and zpaq, the compression overhead per thread is significant.
As we can work out what that compression overhead is, we can factor that into testing how much ram we can allocate.
There is no advantage to running multiple threads when there is no compression back end so drop to 1 only.
Limit ram for compression back end to 1/3 ram regardless for when OSs lie due to heavy overcommit.
2011-02-22 15:19:31 +11:00
Con Kolivas bb33f7571c Multi-threading speed ups.
Add one more thread on compression and decompression to account for the staggered nature of thread recruitment.
Make the initial buffer slightly smaller and make it progressively larger, thus recruiting threads sooner and more evenly.
This also speeds up decompression for the same reason.
Check the amount of memory being used by each thread on decompression to ensure we don't try to recruit too much ram.
2011-02-22 00:49:50 +11:00
Con Kolivas 88e3df6af1 Print perror before unlinking files.
Join common parts of fatal errors.
Update copyright notices.
Small improvement to visual output.
2011-02-21 16:11:59 +11:00
Con Kolivas a7b4708bd2 Use a different failure mode for when perror is unlikely to be set.
Add 2 unlikely wrappers.
2011-02-21 14:51:20 +11:00
Con Kolivas 74df2b5973 Minor updates to man pages, lrzip.conf example file.
Update main help screen to include environment settings.
Update to respect $TMP environment variable for TMP files.
Updated control structure to include tmpdir pointer.
Update lrzip.conf parser to respect -U -M options.
Update lrzip.conf example to include new parameters.
Reorder main Switch loop in main.c for readability.
Have MAXRAM and control.window be exclusive. MAXRAM wins.
Have UNLIMITED and control.window be exclusive. UNLIMITED wins.
Have UNLIMITED and MAXRAM be exclusive. UNLIMITED wins.
Corrects heuristic computation in rzip.c which would override
MAXRAM or UNLIMITED if control.window set
Show heuristically computed control.window when computed.
Remove display compression level from control.window verbose output.
Update print_verbose format for Testing for incompressible data in stream.c
to omit extra \n.

Changes by Peter Hyman <pete@peterhyman.com>
2011-02-21 12:03:08 +11:00
Con Kolivas 0b81d38259 Update version to 0.560 2011-02-21 00:14:03 +11:00
Con Kolivas 57e25da244 Update copyright yeah in updated files. 2011-02-20 23:04:44 +11:00
Con Kolivas c9863e0e60 Change default behaviour to deleting broken or damaged files that occur by interrupting lrzip or that fail integrity testing.
Implement the -k option to optionally keep broken or damaged files.
2011-02-20 23:02:15 +11:00
Con Kolivas 9b264959f5 Implement the ability to test the integrity of the file written to disk on decompression. 2011-02-20 22:29:49 +11:00
Con Kolivas 8a27dc5057 Changes to make md5 be used for integrity testing.
Add the md5 value to the end of each archive.
This can then be used for integrity testing instead of crc32.
Keep crc in new archives to maintain compatibility with version 0.5 files.
Use md5 integrity testing on decompression when available in preference, and disable calculation of crc32.
Display the choice of integrity testing in verbose output and when -i is used.
Display the md5 and crc values when max verbosity, file info, or display hash is enabled.
Store a new flag in the magic header to show that the md5 value is stored at the end of the file.
Update the magic header information document.
2011-02-20 18:01:19 +11:00
Con Kolivas fb2a12744a Implement md5 checking on decompression.
Implement hash check flag to determine whether to show md5sum on compression/decompression or not.
2011-02-18 15:16:13 +11:00
Con Kolivas c2417877bc Being implementing md5 hash checking by importing the md5 code from coreutils.
Implement md5 hash checking on compression by doing the md5 hash check as each sb low buffer has been allocated to avoid going over the file again where possible.
2011-02-18 09:09:40 +11:00
Con Kolivas 626e0be281 Convert semaphore primitives to pthread_mutexes making them more portable, thus allowing multithreading to work on OSX. 2011-02-17 00:24:28 +11:00
Con Kolivas 05c5326df3 Revert "OSX doesn't support unnamed semaphores so to make it work, fake the threading by just creating the threads and waiting for them to finish."
This reverts commit b81542cea4.

Revert the change bypassing semaphores in OSX in preparation for changing the semaphores to mutexes.
2011-02-16 17:40:50 +11:00
Con Kolivas ea9b00c839 Update version number to 0.552 and update documentation. 2011-02-11 13:22:29 +11:00
Con Kolivas b81542cea4 OSX doesn't support unnamed semaphores so to make it work, fake the threading by just creating the threads and waiting for them to finish.
This is done by making the semaphore wrappers null functions on osx and closing the thread in the creation wrapper.
Move the wrappers to rzip.h to make this change clean.
2011-02-11 12:22:09 +11:00
Con Kolivas 2a0553bc54 Revert "Decompress more than one stream at a time if there are threads free and the end of one stream is reached."
This reverts commit 8ee9ef64f5.

This change is unreliable. Hence revert it and all dependent patches.
2011-02-09 12:39:15 +11:00
Con Kolivas 8239635038 Revert "Limit the maximum number of threads on stream 0 to 1 again as stream 1 data always appear after a chunk of stream 0 data."
This reverts commit 0b0f6db606.
2011-02-09 12:39:02 +11:00
Con Kolivas 0b0f6db606 Limit the maximum number of threads on stream 0 to 1 again as stream 1 data always appear after a chunk of stream 0 data. 2011-02-09 10:45:03 +11:00
Con Kolivas 8ee9ef64f5 Decompress more than one stream at a time if there are threads free and the end of one stream is reached.
Still limit total threads running to control.threads.
This affords a small speedup on decompression.
2011-02-08 11:58:01 +11:00
Con Kolivas 9c2b86fec6 We are flushing the wrong file on decompression. Make sure we flush the file out. 2011-02-08 08:27:22 +11:00
Con Kolivas 191a55d03c Apply correct fix for freeBSD not implementing mremap thanks to Brian Carlson. 2011-01-02 14:23:29 +11:00
Con Kolivas 2cabb335cb Update copyright notices courtesy of Jari Aalto. 2010-12-16 09:45:21 +11:00
Con Kolivas e83612fc0a Freebsd doesn't do mremap. Use the fake one. 2010-12-16 09:42:34 +11:00
Con Kolivas 654ae02ba6 Quick bump to version 0.551.
Update docs.
2010-12-12 17:48:07 +11:00
Con Kolivas 981859fdba Version to 0.550. 2010-12-12 10:51:29 +11:00
Con Kolivas a6ab7c875b Limit the number of threads decompressing stream 0 to just 1 since it's always followed by stream 1 chunks, and it may lead to failure to decompress due to running out of memory by running too many threads. 2010-12-11 00:04:30 +11:00
Con Kolivas 50437a8447 Move the threading on compression to higher up in the code, allowing the next stream to start using compression threads before the previous stream has finished.
This overlapping of compressing streams means that when files are large enough to be split into multiple blocks, all CPUs will be used more effectively throughout the compression, affording a nice speedup.
Move the writing of the chunk byte size and initial headers into the compthread to prevent any races occurring.
Fix a few dodgy callocs that may have been overflowing!
The previous commit reverts were done because the changes designed to speed it up actually slowed it down instead.
2010-12-10 23:51:59 +11:00
Con Kolivas c3dfcfcec1 Update version number to 0.544.
Change suggested maximum compression in README to disable threading with -p 1.
Use bzip2 as a fallback compression when lzma fails due to internal memory errors as may happen on 32 bits.
2010-12-04 21:36:51 +11:00
Con Kolivas 22c87ed3ee Fix missing define. 2010-12-03 19:38:21 +11:00
Con Kolivas 2da407a178 Change decompression threading to have a group of threads for each stream (2 in total), thus making mulithreaded decompression more robust. 2010-12-03 19:35:48 +11:00
Con Kolivas d39d3959e8 uclibc doesn't return valid values via sysconf for ram, so work around it by reading /proc if possible. 2010-11-30 11:24:29 +11:00
Con Kolivas 22da2ee76d Push version number to 0.543.
Update docs.
2010-11-24 21:08:35 +11:00
Con Kolivas 6f2b94be3b Fix the case where a compressed file has more than one stream 0 entry per block.
Limit lzma windows to 300MB in the right place on 32 bit only.
Make the main process less nice than the backend threads since it tends to be the rate limiting step.
2010-11-24 20:12:19 +11:00
Con Kolivas 75e675e6dd Bump version number to 0.542.
Choose sane defaults for memory usage since linux ludicriously overcommits.
Use sliding mmap for any compression windows greater than 2/3 ram.
Consolidate and simplify testing of allocatable ram.
Minor tweaks to output.
Round up the size of the high buffer in sliding mmap to one page.
Squeeze a little more out of 32 bit compression windows.
2010-11-20 01:23:08 +11:00
Con Kolivas 591d791791 Bump version to 0.541.
Limit LZMA window to 300MB on 32 bit as per reports of failure when larger.
Minor documentation and display clean ups.
2010-11-18 23:33:43 +11:00
Con Kolivas 0a4f6807e5 Increase version number to 0.540.
Fix compression type reporting on -i.
Remove some unnecessary output when -i is used.
Update docs and benchmarks.
2010-11-16 23:14:35 +11:00
Con Kolivas 2b08c6e280 Implement massive multithreading decompression.
This is done by taking each stream of data on read in into separate buffers for up to as many threads as CPUs.
As each thread's data becomes available, feed it into runzip once it is requests more of the stream.
Provided there are enough chunks in the originally compressed data, this provides a massive speedup potentially proportional to the number of CPUs. The slower the backend compression, the better the speed up (i.e. zpaq is the best sped up).
Fix the output of zpaq compress and decompress from trampling on itself and racing and consuming a lot of CPU time printing to the console.
When limiting cwindow to 6 on 32 bits, ensure that control.window is also set.
When testing for the maximum size of testmalloc, the multiple used was out by one, so increase it.
Minor output tweaks.
2010-11-16 21:25:32 +11:00
Con Kolivas 1637598c3f Bump version number up to 0.530.
Update all documentation.
Minor fixes by Jari Aalto for build and docs.
2010-11-13 21:37:17 +11:00