summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.c
Commit message (Collapse)AuthorAgeFilesLines
* fixed read-after input in LZ4_decompress_safe()Yann Collet2019-04-191-1/+1
|
* address a few minor Visual warningsYann Collet2019-04-181-0/+1
| | | | and created target cxx17build
* ensure consistent definition and usage of FREEMEMYann Collet2019-04-161-2/+2
| | | | as suggested by @sloutsky in #671
* unified limitedOutput_directiveYann Collet2019-04-151-19/+12
| | | | | | | | | | | between lz4.c and lz4hc.c . was left in a strange state after the "amalgamation" patch. Now only 3 directives remain, same name across both implementations, single definition place. Might allow some light simplification due to reduced nb of states possible.
* fix minor visual warningYann Collet2019-04-121-2/+2
| | | | | | yet some overly cautious overflow risk flag, while it's actually impossible, due to previous test just one line above. Changing the cast position, just to be please the thing.
* introduce LZ4_DISTANCE_MAX build macroYann Collet2019-04-111-8/+8
| | | | | | | | | | make it possible to generate LZ4-compressed block with a controlled maximum offset (necessarily <= 65535). This could be useful for compatibility with decoders using a very limited memory budget (<64 KB). Answer #154
* fixed loadDictHCYann Collet2019-04-091-10/+18
| | | | | by making a full initialization instead of a fast reset.
* modified LZ4_initStreamHC() to look like LZ4_initStream()Yann Collet2019-04-091-36/+73
| | | | | it is now a pure initializer, for statically allocated states. It can initialize any memory area, and because of this, requires size.
* fixed strict iso C90Yann Collet2019-04-051-1/+1
|
* created LZ4_initStreamHC()Yann Collet2019-04-051-60/+72
| | | | | | | | - promoted LZ4_resetStreamHC_fast() to stable - moved LZ4_resetStreamHC() to deprecated (but do not generate a warning yet) - Updated doc, to highlight difference between init and reset - switched all invocations of LZ4_resetStreamHC() onto LZ4_initStreamHC() - misc: ensure `make all` also builds /tests
* Make fact that certain variables that are passed into LZ4HC_encodeSequence ↵Tim Zakian2019-01-091-7/+9
| | | | are changed by the function call
* lz4hc.c: change (length >> 8) to (length / 255)qiuyangs2019-01-061-2/+2
| | | Every 0xff byte in the compressed block corresponds to a length of 255 (not 256) in the input data. For long repeating sequences, using (length >> 8) may generate bad compressed blocks.
* Enable amalgamation of lz4hc.c and lz4.cBing Xu2018-11-161-14/+15
|
* Adding information about dirty context for _HC_ family of functionsOleg Khabinov2018-10-101-12/+23
|
* fixed minor cppcheck warnings in libYann Collet2018-09-181-2/+1
|
* avoid final trailing comma for enum listsYann Collet2018-09-131-1/+1
| | | | | | | as detected in #485 by @JoachimSchneider. Refactored the c_standards tests so that these issues get automatically detected in CI tests.
* removed one assert() conditionYann Collet2018-09-051-2/+1
| | | | which is not correct when using LZ4_HC with dictionary and starting from a low address (<0x10000).
* fixed #560Yann Collet2018-09-051-0/+4
| | | | | | | it was a fairly complex scenario, involving source files > 64K and some extraordinary conditions related to specific layout of ranges of zeroes. and only on level 9.
* renamed variable for clarityYann Collet2018-05-071-12/+12
|
* fixed minor conversion warningYann Collet2018-05-071-1/+2
|
* small PA optimizationYann Collet2018-05-061-11/+18
| | | | | which measurably improves speed on levels 9+
* lz4hc: fixed PA / SC parameter orderYann Collet2018-05-051-5/+5
| | | | | | also : reserved PA for levels 9+ (instead of 8+). In most cases, speed is lower, and compression benefit is not worth.
* lz4hc: SC only enabled for opt parserYann Collet2018-05-051-7/+7
| | | | | the trade off is not good for regular HC parser : compression is a little bit better, but speed cost is too large in comparison.
* fixed SC.opt integration with regular HC parserYann Collet2018-05-051-4/+4
| | | | | | | | Only enabled when searching forward. note : it slighly improves compression ratio, but measurably decreases speed. Trade-off to analyse.
* lz4hc: fixed performance issueYann Collet2018-05-051-114/+20
| | | | when combining both PA and CS optimizations
* integrated chain swapper into HC match finderYann Collet2018-05-051-45/+76
| | | | | | | slower than expected Pattern analyzer and Chain Swapper work slower when both activated. Reasons unclear.
* implemented search acceleratorYann Collet2018-05-031-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | greatly improves speed compared to non-accelerated, especially for slower files. On my laptop, -b12 : ``` calgary.tar : 4.3 MB/s => 9.0 MB/s enwik7 : 10.2 MB/s => 13.3 MB/s silesia.tar : 4.0 MB/s => 8.7 MB/s ``` Note : this is the simplified version, without handling dictionaries, external buffer, nor pattern analyzer. Current `dev` branch on these samples gives : ``` calgary.tar : 4.2 MB/s enwik7 : 9.7 MB/s silesia.tar : 3.5 MB/s ``` interestingly, it's slower, presumably due to handling of dictionaries.
* created LZ4HC_FindLongestMatch()Yann Collet2018-05-031-16/+88
| | | | | | simplified match finder only searching forward and within current buffer, for easier testing of optimizations.
* increased nbAttempts for lz4 -12Yann Collet2018-05-021-13/+13
| | | | shaves one more kilobyte from silesia.tar
* Merge pull request #521 from lz4/BD_deterministicYann Collet2018-05-011-48/+46
|\ | | | | fix lz4hc -BD non-determinism
| * renamed variable for clarityCyan49732018-05-011-7/+7
| | | | | | | | lowLimit -> lowestMatchIndex
| * lz4hc changed variableYann Collet2018-04-301-2/+2
| | | | | | | | | | to reduce confusion dictLowLimit => dictStart
| * Merge branch 'dev' into BD_deterministicYann Collet2018-04-271-26/+44
| |\
| * | fix lz4hc -BD non-determinismYann Collet2018-04-271-3/+2
| | | | | | | | | | | | related to chain table update
| * | lz4hc : minor editions for clarityYann Collet2018-04-271-38/+37
| | |
* | | 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
|