diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-05-20 22:26:03 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-05-20 22:26:03 (GMT) |
commit | 8c38ddd7e67354aa3205ac8c03e5b8f78f567a48 (patch) | |
tree | e6599dd4fb5ca44d2c852154f489725f209f7af9 /lz4.h | |
parent | 9ac680972a3c124e2e512f7202889c4d397c6f9b (diff) | |
download | lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.zip lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.tar.gz lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.tar.bz2 |
Introduce : LZ4_compress_limitedOutput_usingDict()
Diffstat (limited to 'lz4.h')
-rw-r--r-- | lz4.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -181,11 +181,17 @@ typedef struct { unsigned int table[LZ4_DICTSIZE_U32]; } LZ4_dict_t; /* * LZ4_compress_usingDict - * Compress data block 'source', using blocks compressed before (with the same function) to improve compression ratio + * Compress data block 'source', using blocks compressed before to improve compression ratio * Previous data blocks are assumed to still be present at their previous location. */ int LZ4_compress_usingDict (LZ4_dict_t* LZ4_dict, const char* source, char* dest, int inputSize); -//int LZ4_compress_limitedOutput_usingDict (LZ4_dict_t* LZ4_dict, const char* source, char* dest, int inputSize, int maxOutputSize); + +/* + * LZ4_compress_limitedOutput_usingDict + * Same as before, but also specify a maximum target compressed size (maxOutputSize) + * If it cannot be met, compression exits, and return a zero. + */ +int LZ4_compress_limitedOutput_usingDict (LZ4_dict_t* LZ4_dict, const char* source, char* dest, int inputSize, int maxOutputSize); /* * LZ4_setDictPos |