summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-03-25 17:06:40 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-03-25 17:06:40 (GMT)
commita357f434f06de70e5d670b8669becccb09f4c7a6 (patch)
tree0788b37b46dc45c6744e1ad1f4435a77140012b4 /lib/lz4hc.h
parent4a9335bd605421218e3cc87dc77c4634051469eb (diff)
downloadlz4-a357f434f06de70e5d670b8669becccb09f4c7a6.zip
lz4-a357f434f06de70e5d670b8669becccb09f4c7a6.tar.gz
lz4-a357f434f06de70e5d670b8669becccb09f4c7a6.tar.bz2
Fixed cast-align warnings on 32-bits
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.