Commit graph

108 commits

Author SHA1 Message Date
Con Kolivas
3e10b27422 More divide by zero output fixes. 2011-05-08 00:45:56 +10:00
Con Kolivas
0d86b8ba0e More percentage display fixes for divide by zero errors. 2011-05-08 00:38:33 +10:00
Con Kolivas
a1359276f4 Fix nan when no hashes found in verbose message. 2011-05-08 00:34:09 +10:00
Con Kolivas
1ea75154d6 Silence compiler warnings. 2011-05-08 00:05:46 +10:00
Con Kolivas
55dc9b0095 Fix the arbitrary lower limit of 128 bytes by compressing zeroes beyond the size of the chunk.
Put special case management of zero sized files.
Modify the percentage calculation to be able to cope with small numbers and zeroes.
2011-05-07 18:37:25 +10:00
Con Kolivas
6ceaeb5f93 Progress update percent was being zeroed in rzip.c thus displaying on every loop. Move it higher, fixing the amount of output to the terminal. 2011-05-07 10:19:12 +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
70e7866271 Include arpa/inet.h for those OSs that have endian details elsewhere. 2011-03-22 21:47:24 +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
2736118f82 Check for different endian.h includes and variants of le32toh. 2011-03-22 07:57:32 +11:00
Con Kolivas
a30efcaa55 Portable generic byteswap for BE. 2011-03-22 00:13:29 +11:00
Con Kolivas
c533b031bc Fix trivial compiler warnings. 2011-03-21 23:36:39 +11:00
Con Kolivas
1647b4036d Unused variable. 2011-03-21 21:29:01 +11:00
Con Kolivas
43eb2e4594 Revert "yet yet yet more BE fixes."
This reverts commit 44b93068a3.

Value was not stored but ysed for a memcpy.
2011-03-21 21:27:25 +11:00
Con Kolivas
8c8f5bdd48 lrz_crypt tweaks courtesy of Serge Belyshev. 2011-03-21 20:54:53 +11:00
Con Kolivas
44b93068a3 yet yet yet more BE fixes. 2011-03-21 18:58:38 +11:00
Con Kolivas
2982cb7121 Yet yet more BE fixes. 2011-03-21 16:12:51 +11:00
Con Kolivas
ff5a5ed054 Use separate lrz_encrypt and lrz_decrypt wrappers to lrz_crypt. 2011-03-19 14:04:22 +11:00
Con Kolivas
0b1db75a44 Cleanups. 2011-03-19 13:53:43 +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
b8d8ecfe33 Fix warnings.
Patch ~ by Serge Belyshev.
2011-03-18 10:37:09 +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
4bc23ee001 Centralise where all encryption/decryption is done, and whether to carry over the IV or not. 2011-03-17 14:10:58 +11:00
Con Kolivas
f61632670e Encrypt the md5 value as well to make the file unidentifiable. 2011-03-16 00:29:10 +11:00
ckolivas
cb1f630fe0 Tidy. 2011-03-15 10:41:17 +11:00
ckolivas
091909b552 Refuse to compress a file smaller than a minimum size. 2011-03-15 10:40:14 +11:00
Con Kolivas
9e772d3140 Make ALL decompression use temporary in-ram buffer whenever possible. 2011-03-14 12:48:40 +11:00
Con Kolivas
b644240152 write_1g always uses control->fd_out so don't pass fd to it. 2011-03-14 11:15:35 +11:00
Con Kolivas
19ef7298c8 Cast fstat values to i64 to prevent 32 bit overflows. 2011-03-14 10:21:10 +11:00
Con Kolivas
f2ddd9022c Ignore the eof flag if the file size is known. 2011-03-13 21:31:03 +11:00
Con Kolivas
6ac74aa9f0 Create a flag to know when the temporary output buffer is in use, in preparation for when we use it on decompression. 2011-03-13 08:34:06 +11:00
Con Kolivas
d067a6ea9e Implement the real workings of writing to a temporary buffer before flushing to stdout. 2011-03-12 22:46:57 +11:00
Con Kolivas
7fbec0a783 Prepare to write compressed output by flushing stdout after each chunk is compressed. 2011-03-12 19:56:08 +11:00
Con Kolivas
d87df4f44e Store the file size as zero when the magic header will be written before the size is known. 2011-03-11 23:45:22 +11:00
Con Kolivas
81ab444971 Remove unused flags by fake mremap. 2011-03-09 13:13:33 +11:00
Con Kolivas
dc92d477d1 Remove unused best_h. 2011-03-09 13:10:00 +11:00
Con Kolivas
1a7c409e10 header-mangling-part-X-move-all-headers-defines-into 2011-03-09 08:37:26 +11:00
Con Kolivas
99c3ea2ab9 header-mangling-part-3-remove-ugly-hacks-for-liblrzi 2011-03-09 08:36:07 +11:00
Con Kolivas
1511c27aad header-mangling-part-2-move-all-function-prototypes 2011-03-09 08:34:44 +11:00
Con Kolivas
f6f0a25ef6 rebase-of-function-split-and-control-additions-to-fu 2011-03-09 08:32:14 +11:00
ckolivas
59e5bc0492 Remove all open coded strerrors when they're going to be shown by fatal(). 2011-03-08 12:05:03 +11:00
ckolivas
82a3bd3028 Clean up unused variables. 2011-03-08 11:43:02 +11:00
Con Kolivas
44ed5727b3 Clean up and fix times displayed.
Merge fixes.
2011-03-07 21:05:20 +11:00
Con Kolivas
9fc551c159 Merge branch 'temp'
Conflicts:
	main.c
2011-03-07 17:25:10 +11:00
Con Kolivas
32e182c95a Check for free space in the right place for compression and give the right message. 2011-03-07 17:00:28 +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
a4ac1b8221 Display the progress percentage and ETA when it's known on STDIN compress. 2011-03-07 13:03:43 +11:00
ckolivas
63566a2992 Control.window was broken comparing to zero max_chunk. 2011-02-28 14:10:46 +11:00
ckolivas
ab656aa98a Wrong check in rzip.c will leave a small chunk with unlimited mode. 2011-02-28 14:05:33 +11:00