summaryrefslogtreecommitdiffstats
path: root/lib/lz4frame_static.h
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-08-10 23:53:57 (GMT)
committerYann Collet <cyan@fb.com>2017-08-10 23:53:57 (GMT)
commit757497ae3db93a78d146ff573ae267f54e49c9b6 (patch)
tree2aab5a27525b46a6edd375842d21f911f162b067 /lib/lz4frame_static.h
parent4531637ecdc4b12154c66cc69cfaade185039e4c (diff)
downloadlz4-757497ae3db93a78d146ff573ae267f54e49c9b6.zip
lz4-757497ae3db93a78d146ff573ae267f54e49c9b6.tar.gz
lz4-757497ae3db93a78d146ff573ae267f54e49c9b6.tar.bz2
implemented lz4frame decompression API
Diffstat (limited to 'lib/lz4frame_static.h')
-rw-r--r--lib/lz4frame_static.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/lz4frame_static.h b/lib/lz4frame_static.h
index 5f22aed..b585b72 100644
--- a/lib/lz4frame_static.h
+++ b/lib/lz4frame_static.h
@@ -92,10 +92,11 @@ typedef struct LZ4F_CDict_s LZ4F_CDict;
* When compressing multiple messages / blocks with the same dictionary, it's recommended to load it just once.
* LZ4_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay.
* LZ4_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only.
- * `dictBuffer` can be released after LZ4_CDict creation, since its content is copied within CDict */
+ * `dictBuffer` can be released after LZ4_CDict creation, since its content is copied within CDict */
LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize);
void LZ4F_freeCDict(LZ4F_CDict* CDict);
+
/*! LZ4_compressFrame_usingCDict() :
* Compress an entire srcBuffer into a valid LZ4 frame using a digested Dictionary.
* If cdict==NULL, compress without a dictionary.
@@ -104,8 +105,7 @@ void LZ4F_freeCDict(LZ4F_CDict* CDict);
* The LZ4F_preferences_t structure is optional : you may provide NULL as argument,
* but it's not recommended, as it's the only way to provide dictID in the frame header.
* @return : number of bytes written into dstBuffer.
- * or an error code if it fails (can be tested using LZ4F_isError())
- */
+ * or an error code if it fails (can be tested using LZ4F_isError()) */
size_t LZ4F_compressFrame_usingCDict(void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
const LZ4F_CDict* cdict,
@@ -118,14 +118,24 @@ size_t LZ4F_compressFrame_usingCDict(void* dst, size_t dstCapacity,
* `prefsPtr` is optional : you may provide NULL as argument,
* however, it's the only way to provide dictID in the frame header.
* @return : number of bytes written into dstBuffer for the header,
- * or an error code (which can be tested using LZ4F_isError())
- */
+ * or an error code (which can be tested using LZ4F_isError()) */
size_t LZ4F_compressBegin_usingCDict(LZ4F_cctx* cctx,
void* dstBuffer, size_t dstCapacity,
const LZ4F_CDict* cdict,
const LZ4F_preferences_t* prefsPtr);
+/*! LZ4F_decompress_usingDict() :
+ * Same as LZ4F_decompress(), using a predefined dictionary.
+ * Dictionary is used "in place", without any preprocessing.
+ * It must remain accessible throughout the entire frame decoding. */
+size_t LZ4F_decompress_usingDict(LZ4F_dctx* dctxPtr,
+ void* dstBuffer, size_t* dstSizePtr,
+ const void* srcBuffer, size_t* srcSizePtr,
+ const void* dict, size_t dictSize,
+ const LZ4F_decompressOptions_t* decompressOptionsPtr);
+
+
#if defined (__cplusplus)
}
#endif