summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-05-26 01:13:50 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-05-26 01:13:50 (GMT)
commitbaf78e7e4dcbdf824a76f990ffeb573d113bbbdb (patch)
treee1bcd78b60c5294257662595bbecfabd736785b4 /lib
parent7d182b816ace89d6d6d16b7aee376a9962a05caa (diff)
parent6f50184a4f50e435f6b3322c68b8b8114544496c (diff)
downloadlz4-lz4-r130.zip
lz4-lz4-r130.tar.gz
lz4-lz4-r130.tar.bz2
Merge pull request #111 from Cyan4973/devr130lz4-r130
Dev
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c4
-rw-r--r--lib/lz4.h3
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 55f2359..08cf6b5 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
@@ -432,7 +432,7 @@ static const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t t
return LZ4_getPositionOnHash(h, tableBase, tableType, srcBase);
}
-static int LZ4_compress_generic(
+FORCE_INLINE int LZ4_compress_generic(
void* const ctx,
const char* const source,
char* const dest,
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)