Con Kolivas
086265c83f
Update copyright notices and style to 1TBS for return codes.
2012-03-07 22:04:24 +11:00
ckolivas
1abacd82af
Use the single_mcpy function even if we need the sliding mmap buffer if we won't need to be pageing buf_low.
2012-03-07 16:53:18 +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
a62e78186e
Merge branch 'liblrzip' of github.com:ckolivas/lrzip into liblrzip
...
Conflicts:
rzip.c
2012-03-07 11:41:35 +11:00
Con Kolivas
f496e0705d
get_sb only allows accessing one byte at a time, yet we don't need that functionality when sliding mmap is not in use.
...
User different versions of the function and the larger memcpys depending on whether sliding mmap is in use or not.
This affords a substantial speedup in the rzip phase of files not requiring sliding mmap.
A small optimisation of moving the check for remapping the low buffer also speeds up the sliding mmap version slightly.
2011-09-18 22:29:09 +10:00
discomfitor
3316dd5505
remove trailing whitespace
2011-08-17 20:59:41 +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
cbff8faef7
move liblrzip.h contents to lrzip_private.h global variables-----
2011-08-17 20:59:40 +10:00
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