summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #520 from felixhandte/frame-dict-nitsYann Collet2018-04-271-1/+1
|\ | | | | Minor Fixes to Dictionary Preparation in LZ4 Frame
| * Avoid Possibly Redundant Table Clears When Loading HC DictW. Felix Handte2018-04-271-1/+1
| |
* | ensure favorDecSpeed is properly initializedYann Collet2018-04-271-5/+5
| | | | | | | | | | | | | | also : - fix a potential malloc error - proper use of ALLOC macro inside lz4hc - update html API doc
* | fixed a number of minor cast warningsYann Collet2018-04-271-5/+4
| |
* | fasterDecSpeed can be triggered from cli with --favor-decSpeedYann Collet2018-04-261-1/+1
| |
* | favorDecSpeed feature can be triggered from lz4frameYann Collet2018-04-261-2/+6
| | | | | | | | and lz4hc.
* | introduced ability to parse for decompression speedYann Collet2018-04-261-19/+34
|/ | | | | | | triggered through an enum. Now, it's still necessary to properly expose this capability all the way up to the cli.
* Remove Debug Log StatementsW. Felix Handte2018-04-241-9/+5
|
* Change vLimit CalculationW. Felix Handte2018-04-211-1/+1
|
* Remove Redundant Static AssertW. Felix Handte2018-04-211-1/+0
|
* Simpler loadDict() ResetW. Felix Handte2018-04-201-1/+1
|
* Tolerate Base Pointer UnderflowW. Felix Handte2018-04-201-2/+2
|
* Don't Segfault on Malloc FailureW. Felix Handte2018-04-201-3/+5
|
* Sign-Extend -1 to Pointer WidthW. Felix Handte2018-04-201-3/+2
|
* Fix Constant ValueW. Felix Handte2018-04-201-1/+1
|
* Handle Index Underflows SafelyW. Felix Handte2018-04-201-8/+7
|
* Consts and Asserts and Other Minor NitsW. Felix Handte2018-04-201-6/+8
|
* Add API for Attaching DictionariesW. Felix Handte2018-04-201-0/+3
|
* Also Reset the Chain TableW. Felix Handte2018-04-201-1/+1
|
* Remove inputBuffer from Context, Work Around its AbsenceW. Felix Handte2018-04-201-6/+7
|
* Remove Commented Out Support for Match Continuation over Segment BoundaryW. Felix Handte2018-04-201-5/+0
|
* Fix Signedness of ComparisonW. Felix Handte2018-04-201-1/+1
|
* Don't Clear the Dictionary Context Until No Longer UsefulW. Felix Handte2018-04-201-2/+5
|
* Copy DictCtx into Working Context on Inputs Larger than 4 KBW. Felix Handte2018-04-201-1/+12
|
* Force Inline on HashChainW. Felix Handte2018-04-201-1/+1
|
* Split DictCtx-using Code Into Separate Inlining ChainW. Felix Handte2018-04-201-20/+74
|
* Add Fast Reset PathsW. Felix Handte2018-04-201-2/+19
|
* Remove Match Upper Bounds CheckW. Felix Handte2018-04-201-7/+6
|
* Fix Some Cast/Conversion WarningsW. Felix Handte2018-04-201-9/+11
|
* Fix Offset MathW. Felix Handte2018-04-201-2/+3
|
* Reset Stream in LZ4_compress_HCW. Felix Handte2018-04-201-1/+4
|
* Don't Bother Clearing Chain Table for Working ContextsW. Felix Handte2018-04-201-1/+1
|
* Push Previous Compression Offsets into the PastW. Felix Handte2018-04-201-11/+21
|
* Shift Dict Limit Checks out of the LoopW. Felix Handte2018-04-201-2/+2
|
* Clear Tables on Dict LoadW. Felix Handte2018-04-201-0/+7
|
* Only Perform Dict Lookup if Attempts RemainW. Felix Handte2018-04-201-1/+1
|
* Avoid Resetting Chain TableW. Felix Handte2018-04-201-1/+0
|
* Avoid Resetting Hash TableW. Felix Handte2018-04-201-1/+0
|
* Perform Lookups into the Dictionary ContextW. Felix Handte2018-04-201-0/+35
|
* Set dictCtx Rather than memcpy'ing CtxW. Felix Handte2018-04-201-0/+1
|
* Fully Bounds Check Hash Table ReadsW. Felix Handte2018-04-201-2/+2
|
* Add Debug Log Statements to HCW. Felix Handte2018-04-201-2/+16
|
* modified a few traces for debugtest49732018-04-121-4/+3
|
* Merge branch 'dev' into lowAddrtest49732018-04-041-33/+349
|\
| * Replace calloc() Calls With malloc() Where PossibleW. Felix Handte2018-03-121-1/+1
| |
| * merge lz4opt.h into lz4hc.cYann Collet2018-02-251-4/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a dedicated file for optimal parser made sense during its creation, it allowed Przemyslaw to work more freely on lz4opt, with less dependency on lz4hc, moreover, the optimal parser was more complex, with its own search functions. Since the optimal was rewritten last year, it's now a lot lighter. It makes more sense now to integrate it directly inside lz4hc.c, making it easier to edit (editors are a bit "lost" inside a `*.h` dependent on its #include position), it also reduces the number of files in the project, which fits pretty well with lz4 objectives. (adding lz4hc requires "just" lz4hc.h and lz4hc.c).
| * edge case : compress up to end-mflimit (12 bytes)Yann Collet2018-02-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LZ4 block format specification states that the last match must start at a minimum distance of 12 bytes from the end of the block. However, out of an abundance of caution, the reference implementation would actually stop searching matches at 13 bytes from the end of the block. This patch fixes this small detail. The new version is now able to properly compress a limit case such as `aaaaaaaabaaa\n` as reported by Gao Xiang (@hsiangkao). Obviously, it doesn't change a lot of things. This is just one additional match candidate per block, with a maximum match length of 7 (since last 5 bytes must remain literals). With default policy, blocks are 4 MB long, so it doesn't happen too often Compressing silesia.tar at default level 1 saves 5 bytes (100930101 -> 100930096). At max level 12, it saves a grand 16 bytes (77389871 -> 77389855). The impact is a bit more visible when blocks are smaller, hence more numerous. For example, compressing silesia with blocks of 64 KB (using -12 -B4D) saves 543 bytes (77304583 -> 77304040). So the smaller the packet size, the more visible the impact. And it happens we have a ton of scenarios with little blocks using LZ4 compression ... And a useless "hooray" sidenote : the patch improves the LZ4 compression record of silesia (using -12 -B7D --no-frame-crc) by 16 bytes (77270672 -> 77270656) and the record on enwik9 by 44 bytes (371680396 -> 371680352) (previously claimed by [smallz4](http://create.stephan-brumme.com/smallz4/) ).
| * added one assert()Yann Collet2018-02-201-3/+7
| | | | | | | | suggested by @terrelln
| * slight hc speed benefit (~+1%)Yann Collet2018-02-121-21/+10
| | | | | | | | by optimizing countback
| * slightly improved hc compression speed (+~1-2%)Yann Collet2018-02-111-1/+1
| | | | | | | | by removing bad candidates faster.