summaryrefslogtreecommitdiffstats
path: root/lz4.h
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-11-22 23:46:15 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-11-22 23:46:15 (GMT)
commitb3b207c4db9378f3eb3518c0778ff03a9b5cdbb3 (patch)
treeea45c82b0f50dba17dd2bafa2b42de57a77ab8b4 /lz4.h
parent73554386ed8c9b08940411c0e62bbdca3216f8cd (diff)
downloadlz4-b3b207c4db9378f3eb3518c0778ff03a9b5cdbb3.zip
lz4-b3b207c4db9378f3eb3518c0778ff03a9b5cdbb3.tar.gz
lz4-b3b207c4db9378f3eb3518c0778ff03a9b5cdbb3.tar.bz2
New endian & alignment code
Diffstat (limited to 'lz4.h')
-rw-r--r--lz4.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lz4.h b/lz4.h
index 0350f6a..f995b05 100644
--- a/lz4.h
+++ b/lz4.h
@@ -172,14 +172,14 @@ int LZ4_decompress_safe_partial (const char* source, char* dest, int compressedS
Experimental Streaming Compression Functions
***********************************************/
-#define LZ4_STREAMSIZE_U32 ((1 << (LZ4_MEMORY_USAGE-2)) + 8)
-#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U32 * sizeof(unsigned int))
+#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4)
+#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long))
/*
* LZ4_stream_t
* information structure to track an LZ4 stream.
* important : init this structure content before first use !
*/
-typedef struct { unsigned int table[LZ4_STREAMSIZE_U32]; } LZ4_stream_t;
+typedef struct { unsigned long long table[LZ4_STREAMSIZE_U64]; } LZ4_stream_t;
/*
* LZ4_resetStream
@@ -234,14 +234,14 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_streamPtr, char* safeBuffer, int dictSize);
Experimental Streaming Decompression Functions
************************************************/
-#define LZ4_STREAMDECODESIZE_U32 8
-#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U32 * sizeof(unsigned int))
+#define LZ4_STREAMDECODESIZE_U64 4
+#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
/*
* LZ4_streamDecode_t
* information structure to track an LZ4 stream.
* important : init this structure content using LZ4_setStreamDecode or memset() before first use !
*/
-typedef struct { unsigned int table[LZ4_STREAMDECODESIZE_U32]; } LZ4_streamDecode_t;
+typedef struct { unsigned long long table[LZ4_STREAMDECODESIZE_U64]; } LZ4_streamDecode_t;
/*
* If you prefer dynamic allocation methods,