Commit graph

77 commits

Author SHA1 Message Date
Con Kolivas d8df50c9b7 Update various copyright dates. 2013-09-02 12:21:54 +10:00
Con Kolivas b076dbb59d Set the control lzma properties only once. 2013-09-01 12:17:51 +10:00
Con Kolivas 4db4641dae Add a control lock mutex for protecting certain control variables. 2013-09-01 12:11:51 +10:00
Con Kolivas 73e921b862 Check endianness of build with autotools to enable md5 support on more platforms. 2012-12-30 13:10:47 +11:00
Con Kolivas 7e88495988 Cope with missing ffsll() on various platforms. 2012-07-07 21:54:05 +10:00
Con Kolivas 901e507bd8 Include test for pthread.h and include header in lrzip_private.h. 2012-07-07 21:16:11 +10:00
Con Kolivas 5edf8471d1 Perform all checksumming in a separate thread to speed up the hash search in the rzip phase. 2012-03-11 11:51:36 +11:00
Con Kolivas 0e593f7681 Pass one less variable to the get_sb function as an optimisation. 2012-03-11 01:04:44 +11:00
Con Kolivas 43402d1c76 Revert "Bypass most checks performed via the inbuilt expect macros likely and unlikely for non-debug builds."
This reverts commit 3a1d097830.

Did not offer any substantial speedup.
2012-03-07 21:57:07 +11:00
ckolivas 3a1d097830 Bypass most checks performed via the inbuilt expect macros likely and unlikely for non-debug builds. 2012-03-07 17:54:04 +11:00
ckolivas af0976f804 Work around rest arguments warnings. 2012-03-07 16:01:13 +11:00
ckolivas 43f407aa04 Remove global variables sliding_buffer get_sb and do_mcpy and put them in rzip_control. 2012-03-07 14:48:21 +11:00
ckolivas e6ae7c528a Add __maybe_unused macro and use to stop warnings from lzma dummy allocs. 2012-03-07 12:58:58 +11:00
ckolivas a62e78186e Merge branch 'liblrzip' of github.com:ckolivas/lrzip into liblrzip
Conflicts:
	rzip.c
2012-03-07 11:41:35 +11:00
Con Kolivas a28def8d05 Mremap is linux only, so reverse the check for its presence and use fake mremap everywhere else. 2011-09-21 16:38:52 +10:00
Con Kolivas a0fe1a8c8e Merge branch 'master' into liblrzip
Conflicts:
	runzip.c
	stream.h
2011-09-15 08:31:00 +10:00
Con Kolivas e1f2138060 Make sure to read to the end of all streams when closing down an rzip stream.
This would have made lrzip unable to decompress some rare archives if they ended up stream 0.
2011-09-15 08:28:30 +10:00
discomfitor 223a1107ea add info callback which provides percentage completion of operation 2011-08-17 20:59:41 +10:00
discomfitor 63141a1035 add some gross bucketing to implement a queue for freeing stream_info structs after an operation has completed (in library mode ONLY; no changes will occur during regular execution) to fix some leaks 2011-08-17 20:59:41 +10:00
discomfitor 949c6d7a97 another semi-clusterfuck commit: *new logging macros *allow compression to and from any FILE, not just stdin/stdout *update main.c to work with the above 2011-08-17 20:59:41 +10:00
discomfitor 6dd20d735b giant clusterfuck commit: *add and use alloca/strdupa in some spots *implement return values on almost every function *free() is now a macro which also nulls the freed pointer *when in 'library mode', fatal_exit() will not be called *fatal()/failure() are now macros which add line number and file for logging *all occurrences of fatal/failure in files other than main.c are now wrapped to use a logging callback (if specified) and then return *functions now clean up resources on returning with an error 2011-08-17 20:59:40 +10:00
discomfitor 133b201867 move more code out of main.c, allocate outfile suffix 2011-08-17 20:59:40 +10:00
discomfitor 08d2294e5e add password callback hook 2011-08-17 20:59:40 +10:00
discomfitor cbff8faef7 move liblrzip.h contents to lrzip_private.h global variables----- 2011-08-17 20:59:40 +10:00
discomfitor 1c64dcfb31 more initialization stuff out of main(), remove weird coincidentally successful one_g variable 2011-08-17 20:59:40 +10:00
discomfitor 59f10b2c9c move functions+defines out of main.c 2011-08-17 20:59:40 +10:00
ckolivas 127a101b14 Disable md5 checking on apple for now till someone fixes it. 2011-04-13 14:50:26 +10:00
Con Kolivas f81f8c68c7 Fixes to make lrzip compile on cygwin courtesy of Тулебаев Салават . 2011-04-11 21:51:53 +10:00
Con Kolivas e561a9a080 mremap is not a macro, check explicitly for freebsd and apple and define it only then. 2011-03-23 08:34:09 +11:00
Con Kolivas b27e1df879 Revert "Modify the file format to not include rzip chunk size except for STDOUT chunked files thus decreasing the file format size further."
This reverts commit 131d4c92c2.

Breaks STDIN/OUT so revert this change and cope with the slightly extra file size on non-chunked files.
2011-03-23 07:59:04 +11:00
Con Kolivas 8077412ee5 Allow files with non-standard extensions to be tested or decompressed if they actually exist.
Don't allow a suffix if an actual output filename has been specified.
Convert ints to chars when they can be.
2011-03-23 01:51:40 +11:00
ckolivas df1ec6dd08 Remove unused. 2011-03-22 13:06:44 +11:00
ckolivas f56e48c4f2 Modify maxram to mean the most we'll allocate in one chunk and add usable_ram for the most we'll allocate to one task.
Limit all maxram on 32bits to 1GB since most don't like mallocing more than this.
Update testing to allow larger total amount based on usable ram while sticking to maxram limit per alloc.
2011-03-22 12:10:21 +11:00
Con Kolivas 68cca4dea5 More streamlining of version number. Fixes problems with osx version displayed. 2011-03-22 09:06:13 +11:00
Con Kolivas 131d4c92c2 Modify the file format to not include rzip chunk size except for STDOUT chunked files thus decreasing the file format size further. 2011-03-22 09:04:24 +11:00
Con Kolivas 2736118f82 Check for different endian.h includes and variants of le32toh. 2011-03-22 07:57:32 +11:00
Con Kolivas fae0f0d493 Merge branch 'master' into endian 2011-03-22 00:51:15 +11:00
Con Kolivas 93f7c602d0 Fixes for 32 bit limits and osx compilation. 2011-03-22 00:46:12 +11:00
Con Kolivas a30efcaa55 Portable generic byteswap for BE. 2011-03-22 00:13:29 +11:00
Con Kolivas 5c24fd02cc Make tmp bufs uchar to avoid warnings. 2011-03-21 23:09:39 +11:00
Con Kolivas 3a4344bba4 Convert salt 8 to SALT_LEN. 2011-03-21 20:56:36 +11:00
Con Kolivas 8c8f5bdd48 lrz_crypt tweaks courtesy of Serge Belyshev. 2011-03-21 20:54:53 +11:00
Con Kolivas 77d44ce108 Disable output when it's not known. More endian fixes. 2011-03-20 22:22:54 +11:00
Con Kolivas 0dad7dcc5a Modify the encrypted version to not write down the rzip chunk size, then keep track of where each block header is written, go back and write 8 bytes of salt before it and encrypt the headers in place. 2011-03-20 15:45:44 +11:00
ckolivas 5005c2dff5 Get rid of extra data in new header and stick to old header size, compacting extra info into existing space. 2011-03-18 17:32:47 +11:00
ckolivas e856d481bf Discard hash_iv entirely, using passphrase hash and centralise key generation.
Patch by Serge Belyshev.
2011-03-18 10:22:58 +11:00
Con Kolivas a3e80871c2 Add 8 bytes of random data to the start of every encrypted compressed block and use it along with 8 bytes from the stored salt to make a unique key and IV for encryption. 2011-03-18 00:06:11 +11:00
ckolivas d63a9a02ff Use a separate IV for when it is sequentially updated in preparation for encrypting the headers as well. 2011-03-17 16:00:57 +11:00
Con Kolivas 5fd7c82e1f Implement ciphertext stealing to not have to pad compressed blocks courtesy of Serge Belyshev who saved me hours of debugging thanks! 2011-03-16 21:24:05 +11:00
Con Kolivas 928a0a098a Consolidate padded length throughout. 2011-03-16 10:29:16 +11:00