diff options
author | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2011-09-29 20:28:37 (GMT) |
---|---|---|
committer | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2011-09-29 20:28:37 (GMT) |
commit | da9037238ca0bc3a776d98c7ba3765b47089a053 (patch) | |
tree | 41ed8949197f92de0c6b2a553b22184e1ffc385f /lz4.h | |
parent | ab75a32104554284e900cbcb27b9007565b5d364 (diff) | |
download | lz4-da9037238ca0bc3a776d98c7ba3765b47089a053.zip lz4-da9037238ca0bc3a776d98c7ba3765b47089a053.tar.gz lz4-da9037238ca0bc3a776d98c7ba3765b47089a053.tar.bz2 |
- Improved compression ratio
- Added special mode for small packet (<=64KB) which improves both compression and speed : LZ4_compress64kCtx()
git-svn-id: https://lz4.googlecode.com/svn/trunk@35 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'lz4.h')
-rw-r--r-- | lz4.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -79,6 +79,8 @@ int LZ4_compressCtx(void** ctx, char* source, char* dest, int isize); LZ4_compressCtx :
This function explicitly handles the CTX memory structure.
It avoids allocating/deallocating memory between each call, improving performance when malloc is time-consuming.
+ Note : when memory is allocated into the stack (default mode), there is no "malloc" penalty.
+ Therefore, this function is mostly useful when memory is allocated into the heap (it requires increasing HASH_LOG value beyond STACK_LIMIT)
On first call : provide a *ctx=NULL; It will be automatically allocated.
On next calls : reuse the same ctx pointer.
|