summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-03-22 12:42:00 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-03-22 12:42:00 (GMT)
commit7cf4e5c94136ee625d7225a72d4c38589a03ec5d (patch)
tree5775808a82e56f5318d7030bae2d4bf3e41058a2 /lib
parentf02adc79389732177dca6fa21a3e716249aa63dd (diff)
downloadlz4-7cf4e5c94136ee625d7225a72d4c38589a03ec5d.zip
lz4-7cf4e5c94136ee625d7225a72d4c38589a03ec5d.tar.gz
lz4-7cf4e5c94136ee625d7225a72d4c38589a03ec5d.tar.bz2
Updates tests & Man pages
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c6
-rw-r--r--lib/lz4.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index cea6b5a..e15a022 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -456,7 +456,7 @@ typedef enum { full = 0, partial = 1 } earlyEnd_directive;
* Compression functions
********************************/
-static U32 LZ4_hashSequence(U32 sequence, tableType_t tableType)
+static U32 LZ4_hashSequence(U32 sequence, tableType_t const tableType)
{
if (tableType == byU16)
return (((sequence) * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1)));
@@ -466,7 +466,7 @@ static U32 LZ4_hashSequence(U32 sequence, tableType_t tableType)
static U32 LZ4_hashPosition(const BYTE* p, tableType_t tableType) { return LZ4_hashSequence(LZ4_read32(p), tableType); }
-static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase)
+static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t const tableType, const BYTE* srcBase)
{
switch (tableType)
{
@@ -502,7 +502,7 @@ static int LZ4_compress_generic(
int inputSize,
int maxOutputSize,
limitedOutput_directive outputLimited,
- tableType_t tableType,
+ tableType_t const tableType,
dict_directive dict,
dictIssue_directive dictIssue)
{
diff --git a/lib/lz4.h b/lib/lz4.h
index bb823d8..7b938da 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -212,6 +212,7 @@ int LZ4_loadDict (LZ4_stream_t* LZ4_streamPtr, const char* dictionary, int dictS
* LZ4_compress_continue
* Compress data block 'source', using blocks compressed before as dictionary to improve compression ratio
* Previous data blocks are assumed to still be present at their previous location.
+ * dest buffer must be already allocated, and sized to at least LZ4_compressBound(inputSize)
*/
int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize);
@@ -228,8 +229,7 @@ int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char
* save it into a safer place (char* safeBuffer)
* Note : you don't need to call LZ4_loadDict() afterwards,
* dictionary is immediately usable, you can therefore call again LZ4_compress_continue()
- * Return : dictionary size in bytes, or 0 if error
- * Note : any dictSize > 64 KB will be interpreted as 64KB.
+ * Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error
*/
int LZ4_saveDict (LZ4_stream_t* LZ4_streamPtr, char* safeBuffer, int dictSize);