From 05c3f66bb8f0c4b4f4fc8422b1afdf982bbd86e6 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 12 May 2015 10:10:20 +0100 Subject: Updated a few comments --- lib/lz4.c | 2 +- lib/lz4.h | 3 +-- lz4_Frame_format.md | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/lz4.c b/lib/lz4.c index 55f2359..c74044e 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -45,7 +45,7 @@ /* * ACCELERATION_DEFAULT : - * Select the value of "acceleration" for LZ4_compress_fast() when parameter == 0 + * Select "acceleration" for LZ4_compress_fast() when parameter value <= 0 */ #define ACCELERATION_DEFAULT 1 diff --git a/lib/lz4.h b/lib/lz4.h index 20e3d48..99c6ebb 100644 --- a/lib/lz4.h +++ b/lib/lz4.h @@ -122,8 +122,8 @@ LZ4_compress_fast() : Same as LZ4_compress_default(), but allows to select an "acceleration" factor. The larger the acceleration value, the faster the algorithm, but also the lesser the compression. It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed. - An acceleration value of "0" means "use Default value" (see lz4.c) An acceleration value of "1" is the same as regular LZ4_compress_default() + Values <= 0 will be replaced by ACCELERATION_DEFAULT (see lz4.c), which is 1. */ int LZ4_compress_fast (const char* source, char* dest, int sourceSize, int maxDestSize, int acceleration); @@ -145,7 +145,6 @@ LZ4_compress_destSize() : into already allocated buffer 'dest' of size 'targetDestSize'. This function either compresses the entire 'source' content into 'dest' if it's large enough, or fill 'dest' buffer completely with as much data as possible from 'source'. - Original idea by WiredTiger team. *sourceSizePtr : will be modified to indicate how many bytes where read from 'source' to fill 'dest'. New value is necessarily <= old value. return : Nb bytes written into 'dest' (necessarily <= targetDestSize) diff --git a/lz4_Frame_format.md b/lz4_Frame_format.md index e8aa08f..73d3cba 100644 --- a/lz4_Frame_format.md +++ b/lz4_Frame_format.md @@ -205,8 +205,8 @@ This is the original (uncompressed) size. This information is optional, and only present if the associated flag is set. Content size is provided using unsigned 8 Bytes, for a maximum of 16 HexaBytes. Format is Little endian. -This value is informational. -It can be safely skipped by a conformant decoder. +This value is informational, typically for display or memory allocation. +It can be skipped by a decoder, or used to validate content correctness. __Header Checksum__ -- cgit v0.12