summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-03-27 10:28:03 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-03-27 10:28:03 (GMT)
commit2d4fed5ed2a8e0231f98d79699d28af0142d0099 (patch)
treebd552cc1b30993a7f0e3a329a5221abd2cd69466 /lib/lz4hc.h
parent00c3208c7a352f4136300b257b418c55f07450c8 (diff)
parentce71b073b5a4a9e2bdd78855f50ddc146baac1c5 (diff)
downloadlz4-2d4fed5ed2a8e0231f98d79699d28af0142d0099.zip
lz4-2d4fed5ed2a8e0231f98d79699d28af0142d0099.tar.gz
lz4-2d4fed5ed2a8e0231f98d79699d28af0142d0099.tar.bz2
Merge pull request #65 from Cyan4973/dev
Dev
Diffstat (limited to 'lib/lz4hc.h')
-rw-r--r--lib/lz4hc.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/lz4hc.h b/lib/lz4hc.h
index eb72051..4a05845 100644
--- a/lib/lz4hc.h
+++ b/lib/lz4hc.h
@@ -79,7 +79,7 @@ int LZ4_compressHC2_limitedOutput (const char* source, char* dest, int inputSize
/**************************************
- Using an external allocation
+* Using an external allocation
**************************************/
int LZ4_sizeofStateHC(void);
int LZ4_compressHC_withStateHC (void* state, const char* source, char* dest, int inputSize);
@@ -102,12 +102,18 @@ They just use the externally allocated memory for state instead of allocating th
+/*****************************
+* Includes
+*****************************/
+#include <stddef.h> /* size_t */
+
+
/**************************************
- Experimental Streaming Functions
+* Experimental Streaming Functions
**************************************/
-#define LZ4_STREAMHCSIZE_U64 32774
-#define LZ4_STREAMHCSIZE (LZ4_STREAMHCSIZE_U64 * sizeof(unsigned long long))
-typedef struct { unsigned long long table[LZ4_STREAMHCSIZE_U64]; } LZ4_streamHC_t;
+#define LZ4_STREAMHCSIZE 262192
+#define LZ4_STREAMHCSIZE_SIZET (LZ4_STREAMHCSIZE / sizeof(size_t))
+typedef struct { size_t table[LZ4_STREAMHCSIZE_SIZET]; } LZ4_streamHC_t;
/*
LZ4_streamHC_t
This structure allows static allocation of LZ4 HC streaming state.