diff options
author | Yann Collet <cyan@fb.com> | 2018-02-18 19:00:33 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2018-02-18 19:00:33 (GMT) |
commit | d74f07974892aa5e8d1adc28b8ad9058e06fcadf (patch) | |
tree | 0961e77124cb76994ef77b8efeb615c76e654496 | |
parent | 9f338ae204f4c04bb5b720f7bb804e764e4c820e (diff) | |
download | lz4-d74f07974892aa5e8d1adc28b8ad9058e06fcadf.zip lz4-d74f07974892aa5e8d1adc28b8ad9058e06fcadf.tar.gz lz4-d74f07974892aa5e8d1adc28b8ad9058e06fcadf.tar.bz2 |
update API doc regarding double-buffer strategy
answering question #473
-rw-r--r-- | doc/lz4_manual.html | 4 | ||||
-rw-r--r-- | lib/lz4.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/doc/lz4_manual.html b/doc/lz4_manual.html index ef715f8..b5a4042 100644 --- a/doc/lz4_manual.html +++ b/doc/lz4_manual.html @@ -178,7 +178,9 @@ int LZ4_freeStream (LZ4_stream_t* streamPtr); Important : The previous 64KB of compressed data is assumed to remain preset and unmodified in memory! If less than 64KB has been compressed all the data must be present. - Special 1 : If input buffer is a double-buffer, it can have any size, including < 64 KB. + Special 1 : When input is a double-buffer, they can have any size, including < 64 KB. + Make sure that buffers are separated by at least one byte. + This way, rule becomes simple : each block depends on previous block only. Special 2 : If input buffer is a ring-buffer, it can have any size, including < 64 KB. @return : size of compressed block @@ -266,7 +266,9 @@ LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, in * * Important : The previous 64KB of compressed data is assumed to remain preset and unmodified in memory! * If less than 64KB has been compressed all the data must be present. - * Special 1 : If input buffer is a double-buffer, it can have any size, including < 64 KB. + * Special 1 : When input is a double-buffer, they can have any size, including < 64 KB. + * Make sure that buffers are separated by at least one byte. + * This way, rule becomes simple : each block depends on previous block only. * Special 2 : If input buffer is a ring-buffer, it can have any size, including < 64 KB. * * @return : size of compressed block |