summaryrefslogtreecommitdiffstats
path: root/lib/lz4frame.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | fixed incorrect assertion conditionYann Collet2019-04-131-1/+1
|/ | | | output can use the full length of output buffer
* made LZ4F_getHeaderSize() publicYann Collet2019-04-101-42/+48
|
* modified LZ4_initStreamHC() to look like LZ4_initStream()Yann Collet2019-04-091-1/+2
| | | | | it is now a pure initializer, for statically allocated states. It can initialize any memory area, and because of this, requires size.
* created LZ4_initStream()Yann Collet2019-04-051-2/+2
| | | | | | | | | | - promoted LZ4_resetStream_fast() to stable - moved LZ4_resetStream() into deprecate, but without triggering a compiler warning - update all sources to no longer rely on LZ4_resetStream() note : LZ4_initStream() proposal is slightly different : it's able to initialize any buffer, provided that it's large enough. To this end, it accepts a void*, and returns an LZ4_stream_t*.
* created LZ4_initStreamHC()Yann Collet2019-04-051-57/+69
| | | | | | | | - 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
* fixed an old bug in LZ4F_flush()Yann Collet2019-04-031-47/+67
| | | | | | | which remained undetected so far, as it requires a fairly large number of conditions to be triggered, starting with enabling Block checksum, which is disabled by default, and which usage is known to be extremely rare.
* Make LZ4F_getBlockSize public and publis in experimental sectionTim Zakian2019-01-091-8/+7
|
* [amalgamation] lz4frame.cBing Xu2018-11-261-0/+7
|
* fixed #589Yann Collet2018-10-091-1/+5
| | | | | | | | following recommendations by @raggi. The fix is slightly different, but achieves the same goal, and is backed by a test tool which proves that it works (generates the error before the patch, no longer after the patch).
* added a test for LZ4F_compressEnd()Yann Collet2018-10-091-11/+14
| | | | | | | | | | | | | | | which actively tries to make it write out of bound. For this scenario to be possible, it's necessary to set dstCapacity < LZ4F_compressBound() When a compression operation fails, the CCtx context is left in an undefined state, therefore compression cannot resume. As a consequence : - round trip tests must be aborted, since there is nothing valid to decompress - most users avoid this situation, by ensuring that dstCapacity >= LZ4F_compressBound() For these reasons, this use case was poorly tested up to now.
* fixed improper hintYann Collet2018-09-281-3/+5
| | | | | | | | | | | | | when LZ4F_decompress() decodes an uncompressed block, it provides an incorrect hint for next block when frame checksum is enabled and block checksum is not. Impact is low : the hint is just an hint, the decoder works whatever the amount of input provided. But the assumption that each call to LZ4F_decompress() would generate just one complete block if input size hint was respected was broken by this error.
* fixed minor cppcheck warnings in libYann Collet2018-09-181-7/+7
|
* avoid final trailing comma for enum listsYann Collet2018-09-131-5/+5
| | | | | | | as detected in #485 by @JoachimSchneider. Refactored the c_standards tests so that these issues get automatically detected in CI tests.
* Fixed bugs about incorrect acceleration calculation and benchmarking ↵Jennifer Liu2018-06-271-2/+2
| | | | negative compresion level
* small extDict : fixed side-effectYann Collet2018-05-061-0/+1
| | | | | | don't fix dictionaries of size 0. setting dictEnd == source triggers prefix mode, thus removing possibility to use CDict.
* fixed frametest errorYann Collet2018-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | The error can be reproduced using following command : ./frametest -v -i100000000 -s1659 -t31096808 It's actually a bug in the stream LZ4 API, when starting a new stream and providing a first chunk to complete with size < MINMATCH. In which case, the chunk becomes a dictionary. No hash was generated and stored, but the chunk is accessible as default position 0 points to dictStart, and position 0 is still within MAX_DISTANCE. Then, next attempt to read 32-bits from position 0 fails. The issue would have been mitigated by starting from index 64 KB, effectively eliminating position 0 as too far away. The proper fix is to eliminate such "dictionary" as too small. Which is what this patch does.
* Merge pull request #529 from felixhandte/lz4f-fast-reset-for-streaming-onlyYann Collet2018-05-031-5/+14
|\ | | | | LZ4F: Only Reset the LZ4_stream_t when Init'ing a Streaming Block
| * Only Reset the LZ4 Stream when Init'ing a Streaming BlockW. Felix Handte2018-05-031-5/+14
| |
* | random lz4f clarificationsYann Collet2018-05-021-29/+47
|/ | | | | | | | | | | | | | the initial intention was to update lz4f ring buffer strategy, but lz4f doesn't use ring buffer. Instead, it uses the destination buffer as much as possible, and merely copies just what's required to preserve history into its own buffer, at the end. Pretty efficient. This patch just clarifies a few comments and add some assert(). It's built on top of #528. It also updates doc.
* Merge pull request #520 from felixhandte/frame-dict-nitsYann Collet2018-04-271-7/+14
|\ | | | | Minor Fixes to Dictionary Preparation in LZ4 Frame
| * Avoid Possibly Redundant Table Clears When Loading HC DictW. Felix Handte2018-04-271-1/+1
| |
| * Remove Redundant LZ4_resetStream() CallW. Felix Handte2018-04-271-2/+1
| |
| * Rename LZ4F_applyCDict() -> LZ4F_initStream()W. Felix Handte2018-04-271-4/+12
| |
* | Merge pull request #519 from lz4/fdParserYann Collet2018-04-271-0/+3
|\ \ | |/ |/| Faster decoding speed
| * fixed a number of minor cast warningsYann Collet2018-04-271-1/+1
| |
| * fasterDecSpeed can be triggered from cli with --favor-decSpeedYann Collet2018-04-261-1/+1
| |
| * favorDecSpeed feature can be triggered from lz4frameYann Collet2018-04-261-0/+3
| | | | | | | | and lz4hc.
* | Limit Dictionary Size During LZ4F DecompressionW. Felix Handte2018-04-261-4/+21
|/ | | | Fixes lz4/lz4#517.
* Change Over Includes in the ProjectW. Felix Handte2018-04-241-1/+2
|
* Remove Debug Log StatementsW. Felix Handte2018-04-241-21/+0
|
* Add API for Attaching DictionariesW. Felix Handte2018-04-201-2/+1
|
* Use Fast Reset in LZ4F AgainW. Felix Handte2018-04-201-1/+1
|
* Use Fast Reset API in LZ4FW. Felix Handte2018-04-201-1/+1
|
* Call LZ4F_applyCDict Even on NULL CDictW. Felix Handte2018-04-201-1/+1
|
* Set dictCtx Rather than memcpy'ing CtxW. Felix Handte2018-04-201-6/+3
|
* Add Debug Log Statements to HCW. Felix Handte2018-04-201-0/+21
|
* Minor FixesW. Felix Handte2018-04-111-2/+0
|
* Add a LZ4_STATIC_LINKING_ONLY Macro to Guard Experimental APIsW. Felix Handte2018-04-111-0/+1
|
* Expose dictCtx Functionality in LZ4W. Felix Handte2018-04-111-2/+1
|
* Rename _extState_noReset -> _extState_fastReset and Edit CommentsW. Felix Handte2018-04-111-1/+1
|
* Expose a Faster Stream Reset FunctionW. Felix Handte2018-04-101-3/+1
|
* fix comment styleYann Collet2018-03-211-2/+2
|
* Switch ALLOC() to ALLOC_AND_ZERO() to Paper Over Existing Uninitialized ReadW. Felix Handte2018-03-131-1/+1
|
* Split lz4CtxLevel into Two FieldsW. Felix Handte2018-03-131-17/+10
|
* Another Allocation Fail CheckW. Felix Handte2018-03-131-1/+2
|
* Renames and Comment FixesW. Felix Handte2018-03-121-1/+1
|
* Hoist LZ4F Dictionary Setup into Helper LZ4F_applyCDict()W. Felix Handte2018-03-121-47/+25
|
* Minor Style FixesW. Felix Handte2018-03-121-9/+9
|
* Replace calloc() Calls With malloc() Where PossibleW. Felix Handte2018-03-121-15/+16
|
* Make LZ4F_compressFrame_usingCDict Take a Compression ContextW. Felix Handte2018-03-121-22/+53
|