Commit graph

169 commits

Author SHA1 Message Date
Con Kolivas
d9aea489b9 Silence possibly inadequate space warning with -f and -q options. 2018-05-16 19:28:43 +10:00
Con Kolivas
d212cc1115 Use dealloc() wrapper to minimise risk of local use after free. 2018-05-16 14:12:22 +10:00
Con Kolivas
d05334bd86 checksum.buf should only be changed after the semaphore wait 2016-06-10 21:04:42 +10:00
Con Kolivas
56a84987dd Update copyright dates 2016-06-09 11:16:41 +10:00
Con Kolivas
70bd5e9d3a Allow less than maxram to be malloced for checksum to fix Failed to malloc ckbuf in hash_search2 2016-06-09 11:04:40 +10:00
Con Kolivas
b8c1e9ca63 Big endian fix for Solaris Sparc courtesy of joelfredrikson. 2016-06-09 09:49:43 +10:00
Con Kolivas
9a17a54c49 Making the high buffer only one page size is faster for sliding mmap mode 2015-03-10 21:10:24 +11:00
Con Kolivas
9756dd3785 Fix ISO C warnings in rzip.c 2015-03-10 19:58:10 +11:00
Con Kolivas
8551a43c73 Attempt to decompress file in ram only if we are unable to create temporary files when decompressing to stdout 2015-03-10 12:05:55 +11:00
Con Kolivas
c3bc42e2c8 Avoid checking return values repeatedly on compress that only lead to failures anyway 2015-03-10 09:46:35 +11:00
Con Kolivas
aa753fee53 Microoptimisation 2015-03-09 21:24:50 +11:00
Con Kolivas
edc7f5a7ce Don't check for failure condition that can no longer occur 2015-03-09 21:10:48 +11:00
Con Kolivas
420a483a30 Don't check twice for failure conditions that are fatal in hot paths 2015-03-09 21:03:10 +11:00
ckolivas
707ca69d31 fake_mremap is only used when defined to mremap 2015-03-08 23:30:04 +11:00
ckolivas
f690750340 Fix remaining use of mutexes lock/unlocking in different threads with cksems, corecting cksem usage on osx 2015-03-08 10:10:38 +11:00
ckolivas
dd9dc7555d Update copyright dates 2015-03-08 08:53:47 +11:00
ckolivas
f378595dce Make match_len a function completely removing all indirect calls to get_sb, significantly speeding up the single_get_sb case 2015-03-08 01:21:53 +11:00
ckolivas
cb7b0dd339 Make full_tag a pointer allowing us to avoid a function call for get_sb 2015-03-08 00:59:05 +11:00
ckolivas
cf35575c72 Call sliding_get_sb directly in sliding_next_tag 2015-03-08 00:52:27 +11:00
ckolivas
70db73b955 Make next_tag a pointer to allow ordinary mapping to avoid an extra function call 2015-03-08 00:50:10 +11:00
Maeyanie
2e1fc25543 Fix 'Failed to malloc ckbuf in hash_search2' with very large files.
lrzip was trying to malloc() enough memory to fit the entire length of file it was going to hash, instead of just the size of one chunk. This caused problems when combined with extremely large files.
2013-11-04 18:10:15 -05:00
Con Kolivas
d8df50c9b7 Update various copyright dates. 2013-09-02 12:21:54 +10:00
Con Kolivas
21925e4a9c Massive files fail with -U due to trying to allocate the whole lot in ram while doing checksums. Do it piecemeal to avoid the problem. Patch and debugging courtesy of Adam Tkáč. 2013-09-01 15:46:48 +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
37ef39e70a Fix stdin fake mremap creating null bytes on osx, patch courtesy of John Boyle. 2013-09-01 08:43:28 +10:00
Con Kolivas
2c1dda7b73 Cache frequently used indirectly referenced variables in the sliding mmap code. 2013-03-19 00:17:52 +11:00
Con Kolivas
87fe625829 Micro-optimise sliding_get_sb_range. 2013-03-18 23:58:10 +11:00
Con Kolivas
2df8968e75 A fix for a bug where large files containing the same non-zero bytes which requires a sliding window, courtesy of Serge Belyshev. 2013-03-18 23:50:32 +11:00
Con Kolivas
ccf225f710 Put vchar should take a 64 bit integer and is used from more than one call site so uninline it. 2012-12-31 16:02:54 +11:00
Con Kolivas
6f0410d28f Microoptimise in hash_search. 2012-12-31 15:02:49 +11:00
Con Kolivas
e1fd5d6d11 Inline rzip functions used from only one caller. 2012-12-31 13:24:33 +11:00
Con Kolivas
0b8c0818a0 Check for successful calloc of hash table only after performing it. 2012-12-31 13:16:03 +11:00
Con Kolivas
5591639863 stdin_eof is just a bool 2012-12-31 13:09:47 +11:00
Con Kolivas
02b3250639 hash_bits can only be up to 64 so use a char type. 2012-12-31 13:04:06 +11:00
Con Kolivas
184a8f0025 Rename lrzip.h to lrzip_core.h to cope with case insensitive filesystems not working with Lrzip.h vs lrzip.h 2012-07-07 21:39:40 +10:00
Con Kolivas
8b680e72ac Remove redundant code. 2012-03-16 23:14:49 +11:00
Con Kolivas
19b0636459 Move the update counter to earlier in the hash_search so it still updates even when there are not matches. 2012-03-11 21:12:44 +11:00
Con Kolivas
704d7b5eb6 There is no point using a thread on the last checksum update, nor to add the value to cksum_limit. 2012-03-11 12:22:35 +11: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
f4165ec263 Further micro-optimise match_len. 2012-03-11 09:50:42 +11:00
Con Kolivas
261f2ff1e4 Optimise the hot function empty_hash even further. 2012-03-11 09:25:58 +11:00
Con Kolivas
2fada9fb76 Micro-optimise the hot next_tag function. 2012-03-11 02:17:26 +11:00
Con Kolivas
c136424140 Micro-optimise the match_len function. 2012-03-11 01:56:40 +11:00
Con Kolivas
ba2ebae392 Correct missing adjustment of hash entry. 2012-03-11 01:33:54 +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
92c09a7588 Cache the hash_entry value passing one less variable to hash_empty as a micro-optimisation. 2012-03-11 00:52:38 +11:00
Con Kolivas
f792f72aa5 Use ffsl for a faster lesser_bitness function. 2012-03-11 00:11:11 +11:00
Con Kolivas
cf8567e314 Use as much of the low buffer as possible with a single memcopy before going fine grained byte by byte. 2012-03-08 09:01:31 +11:00
Con Kolivas
754088feb9 Must give the memcpy the sb low offset to work properly. 2012-03-07 23:14:04 +11:00
Con Kolivas
086265c83f Update copyright notices and style to 1TBS for return codes. 2012-03-07 22:04:24 +11:00