summaryrefslogtreecommitdiffstats
path: root/lib/README.md
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2022-09-27 13:30:40 (GMT)
committerYann Collet <cyan@fb.com>2022-09-27 13:30:40 (GMT)
commit586e9a4c6db004fe6dc298b508aa364e22996bdb (patch)
tree1a84fcdf520f8569ae89245e5fc8aecbcee1e20c /lib/README.md
parentb21490232df113efc5fee7251edfc0511a346143 (diff)
downloadlz4-586e9a4c6db004fe6dc298b508aa364e22996bdb.zip
lz4-586e9a4c6db004fe6dc298b508aa364e22996bdb.tar.gz
lz4-586e9a4c6db004fe6dc298b508aa364e22996bdb.tar.bz2
added code documentation on heap mode
and also on decompress_continue variants.
Diffstat (limited to 'lib/README.md')
-rw-r--r--lib/README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/README.md b/lib/README.md
index c1e7b1e..a86cd0d 100644
--- a/lib/README.md
+++ b/lib/README.md
@@ -115,6 +115,15 @@ The following build macro can be selected to adjust source code behavior at comp
(embedded, bootloader, etc).
For more details, see description of this macro in `lib/lz4.h`.
+- `LZ4_HEAPMODE` : Select how stateless compression functions like `LZ4_compress_default()`
+ allocate memory for their hash table,
+ in memory stack (0:default, fastest), or in memory heap (1:requires malloc()).
+
+- `LZ4HC_HEAPMODE` : Select how stateless HC compression functions like `LZ4_compress_HC()`
+ allocate memory for their workspace:
+ in stack (0), or in heap (1:default).
+ Since workspace is rather large, stack can be inconvenient, hence heap mode is recommended.
+
- `LZ4F_HEAPMODE` : selects how `LZ4F_compressFrame()` allocates the compression state,
either on stack (default, value 0) or using heap memory (value 1).