summaryrefslogtreecommitdiffstats
path: root/lz4frame.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-09-10 21:17:03 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-09-10 21:17:03 (GMT)
commitc71de79688ee778c284c5367388b8c45546da25b (patch)
treec45a30b22efb9d9614b9edcb166c365624e3f5c3 /lz4frame.h
parented4a6bf2cb8a46979e2c9f0eab99052844b21f03 (diff)
downloadlz4-c71de79688ee778c284c5367388b8c45546da25b.zip
lz4-c71de79688ee778c284c5367388b8c45546da25b.tar.gz
lz4-c71de79688ee778c284c5367388b8c45546da25b.tar.bz2
Improved lz4frame compression speed
Added : fullbench test -c14 (LZ4F_compressFrame)
Diffstat (limited to 'lz4frame.h')
-rw-r--r--lz4frame.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/lz4frame.h b/lz4frame.h
index a8f8544..bd55a0a 100644
--- a/lz4frame.h
+++ b/lz4frame.h
@@ -91,7 +91,7 @@ typedef struct {
typedef struct {
LZ4F_frameInfo_t frameInfo;
unsigned compressionLevel; /* from 0 to 16 */
- unsigned autoFlush; /* 1 == automatic flush after each call to LZ4F_compress() */
+ unsigned autoFlush; /* 1 == always flush; reduce need for tmp buffer */
unsigned reserved[4];
} LZ4F_preferences_t;
@@ -152,12 +152,10 @@ size_t LZ4F_compressBegin(LZ4F_compressionContext_t compressionContext, void* ds
* or an error code (can be tested using LZ4F_isError())
*/
-size_t LZ4F_compressBound(size_t srcSize, const LZ4F_frameInfo_t* frameInfoPtr);
-size_t LZ4F_getMaxSrcSize(size_t dstMaxSize, const LZ4F_frameInfo_t* frameInfoPtr);
-/* LZ4F_compressBound() : gives the size of Dst buffer given a srcSize to handle worst case situations.
- * LZ4F_getMaxSrcSize() : gives max allowed srcSize given dstMaxSize to handle worst case situations.
- * You can use dstMaxSize==0 to know the "natural" srcSize instead (block size).
- * The LZ4F_frameInfo_t structure is optional : you can provide NULL as argument, all preferences will then be set to default.
+size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr);
+/* LZ4F_compressBound() :
+ * Provides the minimum size of Dst buffer given srcSize to handle worst case situations.
+ * preferencesPtr is optional : you can provide NULL as argument, all preferences will then be set to default.
*/
size_t LZ4F_compress(LZ4F_compressionContext_t compressionContext, void* dstBuffer, size_t dstMaxSize, const void* srcBuffer, size_t srcSize, const LZ4F_compressOptions_t* compressOptionsPtr);