summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-05-12 09:10:20 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-05-12 09:10:20 (GMT)
commit05c3f66bb8f0c4b4f4fc8422b1afdf982bbd86e6 (patch)
tree945cf680efe12801754f264f7b85906b1b8a2059
parent96078481d7672b427aa9b088af74b3f920f9d11e (diff)
downloadlz4-05c3f66bb8f0c4b4f4fc8422b1afdf982bbd86e6.zip
lz4-05c3f66bb8f0c4b4f4fc8422b1afdf982bbd86e6.tar.gz
lz4-05c3f66bb8f0c4b4f4fc8422b1afdf982bbd86e6.tar.bz2
Updated a few comments
-rw-r--r--lib/lz4.c2
-rw-r--r--lib/lz4.h3
-rw-r--r--lz4_Frame_format.md4
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__