update API doc regarding double-buffer strategy

answering question #473
This commit is contained in:
Yann Collet 2018-02-18 11:00:33 -08:00
parent 9f338ae204
commit d74f079748
2 changed files with 6 additions and 2 deletions

View File

@ -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! 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. 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. Special 2 : If input buffer is a ring-buffer, it can have any size, including < 64 KB.
@return : size of compressed block @return : size of compressed block

View File

@ -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! * 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. * 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. * Special 2 : If input buffer is a ring-buffer, it can have any size, including < 64 KB.
* *
* @return : size of compressed block * @return : size of compressed block