summaryrefslogtreecommitdiffstats
path: root/lib/lz4.h
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2019-04-11 22:19:48 (GMT)
committerYann Collet <cyan@fb.com>2019-04-11 22:20:46 (GMT)
commitbcb26565a732062759a2428e167e27ad3c2f6e96 (patch)
tree7b192662cba336b688b23ea04fcd6f48cbb3fc48 /lib/lz4.h
parent8d76c8a44a15cc7c0c1f345ba750e44edac7abb7 (diff)
downloadlz4-bcb26565a732062759a2428e167e27ad3c2f6e96.zip
lz4-bcb26565a732062759a2428e167e27ad3c2f6e96.tar.gz
lz4-bcb26565a732062759a2428e167e27ad3c2f6e96.tar.bz2
improved documentation for LZ4 dictionary compression
Diffstat (limited to 'lib/lz4.h')
-rw-r--r--lib/lz4.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index b86417a..935b55f 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -263,10 +263,15 @@ LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr);
LZ4LIB_API void LZ4_resetStream_fast (LZ4_stream_t* streamPtr);
/*! LZ4_loadDict() :
- * Use this function to load a static dictionary into LZ4_stream_t.
- * Any previous data will be forgotten, only 'dictionary' will remain in memory.
+ * 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)
*/
LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);