diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2019-04-11 15:43:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 15:43:40 -0700 |
commit | 780aac520b69d6369f4e3995624c37e56d75498d (patch) | |
tree | 7b192662cba336b688b23ea04fcd6f48cbb3fc48 /doc | |
parent | 723ba904e2393c69d01f6730bd8b4171e6182845 (diff) | |
parent | bcb26565a732062759a2428e167e27ad3c2f6e96 (diff) | |
download | lz4-780aac520b69d6369f4e3995624c37e56d75498d.tar.gz lz4-780aac520b69d6369f4e3995624c37e56d75498d.tar.bz2 lz4-780aac520b69d6369f4e3995624c37e56d75498d.zip |
Merge pull request #665 from lz4/dict
Dictionary compression
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lz4_manual.html | 11 | ||||
-rw-r--r-- | doc/lz4frame_manual.html | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/doc/lz4_manual.html b/doc/lz4_manual.html index ef1a8b5..4cd21fc 100644 --- a/doc/lz4_manual.html +++ b/doc/lz4_manual.html @@ -180,10 +180,15 @@ int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int src </p></pre><BR> <pre><b>int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); -</b><p> Use this function to load a static dictionary into LZ4_stream_t. - Any previous data will be forgotten, only 'dictionary' will remain in memory. +</b><p> Use this function to reference a static dictionary into LZ4_stream_t. + The dictionary must remain available during compression. + LZ4_loadDict() triggers a reset, so any previous data will be forgotten. + The same dictionary will have to be loaded on decompression side for successful decoding. + Dictionary are useful for better compression of small data (KB range). + While LZ4 accept any input as dictionary, + results are generally better when using Zstandard's Dictionary Builder. Loading a size of 0 is allowed, and is the same as reset. - @return : dictionary size, in bytes (necessarily <= 64 KB) + @return : loaded dictionary size, in bytes (necessarily <= 64 KB) </p></pre><BR> diff --git a/doc/lz4frame_manual.html b/doc/lz4frame_manual.html index d5496a1..914405f 100644 --- a/doc/lz4frame_manual.html +++ b/doc/lz4frame_manual.html @@ -343,7 +343,7 @@ LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx); <pre><b>LZ4FLIB_STATIC_API LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize); LZ4FLIB_STATIC_API void LZ4F_freeCDict(LZ4F_CDict* CDict); -</b><p> When compressing multiple messages / blocks with the same dictionary, it's recommended to load it just once. +</b><p> When compressing multiple messages / blocks using the same dictionary, it's recommended to load it just once. LZ4_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay. LZ4_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. `dictBuffer` can be released after LZ4_CDict creation, since its content is copied within CDict |