summaryrefslogtreecommitdiffstats
path: root/lz4.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-10-25 19:52:10 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-10-25 19:52:10 (GMT)
commit2b421e97d4e7cfbefdc007bf30133b0de7e7e14e (patch)
tree7267d51213e3d1abaf853a80491db38f3d8f82c8 /lz4.h
parente2c84118f52cefe48fd2f751e66ad3ecd904f7b9 (diff)
downloadlz4-2b421e97d4e7cfbefdc007bf30133b0de7e7e14e.zip
lz4-2b421e97d4e7cfbefdc007bf30133b0de7e7e14e.tar.gz
lz4-2b421e97d4e7cfbefdc007bf30133b0de7e7e14e.tar.bz2
HC streaming : support small ringbuffer scenarios
Diffstat (limited to 'lz4.h')
-rw-r--r--lz4.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/lz4.h b/lz4.h
index 7ad736f..eb96067 100644
--- a/lz4.h
+++ b/lz4.h
@@ -47,8 +47,8 @@ extern "C" {
Version
**************************************/
#define LZ4_VERSION_MAJOR 1 /* for major interface/format changes */
-#define LZ4_VERSION_MINOR 3 /* for minor interface/format changes */
-#define LZ4_VERSION_RELEASE 1 /* for tweaks, bug-fixes, or development */
+#define LZ4_VERSION_MINOR 4 /* for minor interface/format changes */
+#define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */
#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
int LZ4_versionNumber (void);
@@ -234,7 +234,7 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_streamPtr, char* safeBuffer, int dictSize);
Experimental Streaming Decompression Functions
************************************************/
-#define LZ4_STREAMDECODESIZE_U32 4
+#define LZ4_STREAMDECODESIZE_U32 8
#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U32 * sizeof(unsigned int))
/*
* LZ4_streamDecode_t
@@ -244,29 +244,29 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_streamPtr, char* safeBuffer, int dictSize);
typedef struct { unsigned int table[LZ4_STREAMDECODESIZE_U32]; } LZ4_streamDecode_t;
/*
+ * If you prefer dynamic allocation methods,
+ * LZ4_createStreamDecode will allocate and initialize an LZ4_streamDecode_t structure
+ * LZ4_freeStreamDecode releases its memory.
+ */
+LZ4_streamDecode_t* LZ4_createStreamDecode(void);
+int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
+
+/*
* LZ4_setStreamDecode
* Use this function to instruct where to find the dictionary.
* This function can be used to specify a static dictionary,
* or to instruct where to find some previously decoded data saved into a different memory space.
- * Setting a size of 0 is allowed (same effect as no dictionary).
+ * Setting a size of 0 is allowed (same effect as no dictionary, same effect as reset).
* Return : 1 if OK, 0 if error
*/
int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize);
/*
- * If you prefer dynamic allocation methods,
- * LZ4_createStreamDecode will allocate and initialize an LZ4_streamDecode_t structure
- * LZ4_freeStreamDecode releases its memory.
- */
-LZ4_streamDecode_t* LZ4_createStreamDecode(void);
-int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
-
-/*
*_continue() :
These decoding functions allow decompression of multiple blocks in "streaming" mode.
- Previously decoded blocks must still be available at the memory position where they were decoded.
- If it's not possible, save the relevant part of decoded data into a safe buffer,
- and indicate where its new address using LZ4_setStreamDecode()
+ Previously decoded blocks *must* remain available at the memory position where they were decoded (up to 64 KB)
+ If this condition is not possible, save the relevant part of decoded data into a safe buffer,
+ and indicate where is its new address using LZ4_setStreamDecode()
*/
int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxDecompressedSize);
int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize);