summaryrefslogtreecommitdiffstats
path: root/lz4.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-05-20 22:26:03 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-05-20 22:26:03 (GMT)
commit8c38ddd7e67354aa3205ac8c03e5b8f78f567a48 (patch)
treee6599dd4fb5ca44d2c852154f489725f209f7af9 /lz4.h
parent9ac680972a3c124e2e512f7202889c4d397c6f9b (diff)
downloadlz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.zip
lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.tar.gz
lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.tar.bz2
Introduce : LZ4_compress_limitedOutput_usingDict()
Diffstat (limited to 'lz4.h')
-rw-r--r--lz4.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lz4.h b/lz4.h
index 5e695c7..b18599f 100644
--- a/lz4.h
+++ b/lz4.h
@@ -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