summaryrefslogtreecommitdiffstats
path: root/lz4.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-07-20 12:34:14 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-07-20 12:34:14 (GMT)
commit1870d48fc8ec38978a3ce4e262cded70216b84d0 (patch)
tree44e3e6f63dcd2b2e08c2339778cd442e6eb94a88 /lz4.h
parent2f93f3afd5e57296e0283530d653757501e65093 (diff)
downloadlz4-1870d48fc8ec38978a3ce4e262cded70216b84d0.zip
lz4-1870d48fc8ec38978a3ce4e262cded70216b84d0.tar.gz
lz4-1870d48fc8ec38978a3ce4e262cded70216b84d0.tar.bz2
Restored : lz4 compression function using externally allocated memory for state
Diffstat (limited to 'lz4.h')
-rw-r--r--lz4.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/lz4.h b/lz4.h
index 3a03a8e..2e90f04 100644
--- a/lz4.h
+++ b/lz4.h
@@ -72,7 +72,7 @@ LZ4_compress() :
Destination buffer must be already allocated,
and must be sized to handle worst cases situations (input data not compressible)
Worst case size evaluation is provided by function LZ4_compressBound()
- inputSize : Max supported value is LZ4_MAX_INPUT_VALUE
+ inputSize : Max supported value is LZ4_MAX_INPUT_SIZE
return : the number of bytes written in buffer dest
or 0 if the compression fails
@@ -129,6 +129,17 @@ int LZ4_compress_limitedOutput (const char* source, char* dest, int inputSize, i
/*
+LZ4_compress_withState() :
+ Same compression functions, but using an externally allocated memory space to store compression state.
+ Use LZ4_sizeofState() to know how much memory must be allocated,
+ and then, provide it as 'void* state' to compression functions.
+*/
+int LZ4_sizeofState(void);
+int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize);
+int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize);
+
+
+/*
LZ4_decompress_fast() :
originalSize : is the original and therefore uncompressed size
return : the number of bytes read from the source buffer (in other words, the compressed size)
@@ -289,11 +300,6 @@ It is highly recommended to stop using these functions and migrated to newer one
/* int LZ4_uncompress (const char* source, char* dest, int outputSize); */
/* int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); */
-/* Obsolete functions for externally allocated state; use streaming interface instead */
-int LZ4_sizeofState(void);
-int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize);
-int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize);
-
/*
* If you prefer dynamic allocation methods,
* LZ4_createStreamDecode()