diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-09-10 21:17:03 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-09-10 21:17:03 (GMT) |
commit | c71de79688ee778c284c5367388b8c45546da25b (patch) | |
tree | c45a30b22efb9d9614b9edcb166c365624e3f5c3 /lz4frame.h | |
parent | ed4a6bf2cb8a46979e2c9f0eab99052844b21f03 (diff) | |
download | lz4-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.h | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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); |