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
Con Kolivas
519123966a
total_read field is no longer used.
2011-03-16 08:32:16 +11:00
Con Kolivas
c5938c6a8b
Implement the actual aes cbc encryption and decryption.
2011-03-15 23:52:39 +11:00
Con Kolivas
acb023988f
Generate sha512 hash and hash iv required to encrypt based on password, timestamp, loops and random salt.
2011-03-15 21:18:29 +11:00
Con Kolivas
412cf013c4
Implement passphrase input.
2011-03-15 16:32:32 +11:00
Con Kolivas
202d972a6c
Add encryption -e option and flag encryption with a control flag, removing encrypt field.
2011-03-15 15:04:58 +11:00
Con Kolivas
65f901a83c
Get the seconds, salt and encryption loop data before compressing.
...
Store seconds in only 5 bytes which is enough for 400 years, leaving more room for random data.
2011-03-15 14:41:47 +11:00
Con Kolivas
6a903eff8d
Convert the usecs field to a dedicated salt one which has 6 random bytes and 2 encoded loops bytes.
2011-03-15 13:14:27 +11:00
ckolivas
65a681a254
Relative offset is not required in tmp inbuf, it can be safely zeroed.
2011-03-15 11:21:26 +11:00
Con Kolivas
d56c826725
Add fd_in field to struct rzip_control.
2011-03-14 14:58:41 +11:00
Con Kolivas
684959efed
Add fields for temporary input buffer and clamp memory accordingly in preparation.
2011-03-14 14:47:26 +11:00
Con Kolivas
4a6fa7602f
Begin decompressing to stdout via temporary buffer by creating a read/write wrapper.
2011-03-14 10:07:51 +11:00