45 # define LZ4_HEAPMODE 0 52 #define ACCELERATION_DEFAULT 1 71 #ifndef LZ4_FORCE_MEMORY_ACCESS 72 # if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ) 73 # define LZ4_FORCE_MEMORY_ACCESS 2 74 # elif defined(__INTEL_COMPILER) || defined(__GNUC__) 75 # define LZ4_FORCE_MEMORY_ACCESS 1 83 #if defined(_MSC_VER) && defined(_WIN32_WCE) 84 # define LZ4_FORCE_SW_BITCOUNT 99 # define FORCE_INLINE static __forceinline 101 # pragma warning(disable : 4127) 102 # pragma warning(disable : 4293) 104 # if defined(__GNUC__) || defined(__clang__) 105 # define FORCE_INLINE static inline __attribute__((always_inline)) 106 # elif defined(__cplusplus) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) 107 # define FORCE_INLINE static inline 109 # define FORCE_INLINE static 113 #if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__) 114 # define expect(expr,value) (__builtin_expect ((expr),(value)) ) 116 # define expect(expr,value) (expr) 119 #define likely(expr) expect((expr) != 0, 1) 120 #define unlikely(expr) expect((expr) != 0, 0) 127 #define ALLOCATOR(n,s) calloc(n,s) 130 #define MEM_INIT memset 136 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) 146 typedef unsigned short U16;
149 typedef unsigned long long U64;
153 #if defined(__x86_64__) 169 #if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==2) 179 #elif defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==1) 185 static U16 LZ4_read16(
const void* ptr) {
return ((
const unalign*)ptr)->u16; }
186 static U32 LZ4_read32(
const void* ptr) {
return ((
const unalign*)ptr)->u32; }
196 U16 val; memcpy(&val, memPtr,
sizeof(val));
return val;
201 U32 val; memcpy(&val, memPtr,
sizeof(val));
return val;
206 reg_t val; memcpy(&val, memPtr,
sizeof(val));
return val;
211 memcpy(memPtr, &value,
sizeof(value));
216 memcpy(memPtr, &value,
sizeof(value));
228 return (
U16)((
U16)p[0] + (p[1]<<8));
239 p[1] = (
BYTE)(value>>8);
249 static void LZ4_wildCopy(
void* dstPtr,
const void* srcPtr,
void* dstEnd)
255 do {
LZ4_copy8(d,s); d+=8; s+=8; }
while (d<e);
264 #define WILDCOPYLENGTH 8 265 #define LASTLITERALS 5 266 #define MFLIMIT (WILDCOPYLENGTH+MINMATCH) 274 #define MAX_DISTANCE ((1 << MAXD_LOG) - 1) 277 #define ML_MASK ((1U<<ML_BITS)-1) 278 #define RUN_BITS (8-ML_BITS) 279 #define RUN_MASK ((1U<<RUN_BITS)-1) 285 #define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } 287 #if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2) 289 # define DEBUGLOG(l, ...) { \ 290 if (l<=LZ4_DEBUG) { \ 291 fprintf(stderr, __FILE__ ": "); \ 292 fprintf(stderr, __VA_ARGS__); \ 293 fprintf(stderr, " \n"); \ 296 # define DEBUGLOG(l, ...) {} 306 if (
sizeof(val)==8) {
307 # if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) 309 _BitScanForward64( &r, (
U64)val );
311 # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) 312 return (__builtin_ctzll((
U64)val) >> 3);
314 static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 };
315 return DeBruijnBytePos[((
U64)((val & -(
long long)
val) * 0x0218A392CDABBD3FULL)) >> 58];
318 # if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) 320 _BitScanForward( &r, (
U32)val );
322 # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) 323 return (__builtin_ctz((
U32)val) >> 3);
325 static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, 3, 2, 2, 1, 3, 2, 0, 1, 3, 3, 1, 2, 2, 2, 2, 0, 3, 1, 2, 0, 1, 0, 1, 1 };
326 return DeBruijnBytePos[((
U32)((val & -(
S32)
val) * 0x077CB531U)) >> 27];
330 if (
sizeof(val)==8) {
331 # if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) 333 _BitScanReverse64( &r, val );
334 return (
unsigned)(r>>3);
335 # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) 336 return (__builtin_clzll((
U64)val) >> 3);
339 if (!(val>>32)) { r=4; }
else { r=0; val>>=32; }
340 if (!(val>>16)) { r+=2; val>>=8; }
else { val>>=24; }
345 # if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) 347 _BitScanReverse( &r, (
unsigned long)val );
348 return (
unsigned)(r>>3);
349 # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) 350 return (__builtin_clz((
U32)val) >> 3);
353 if (!(val>>16)) { r=2; val>>=8; }
else { r=0; val>>=24; }
361 #define STEPSIZE sizeof(reg_t) 364 const BYTE*
const pStart = pIn;
370 return (
unsigned)(pIn - pStart);
375 if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++;
376 return (
unsigned)(pIn - pStart);
380 #ifndef LZ4_COMMONDEFS_ONLY 415 if (tableType ==
byU16)
423 static const U64 prime5bytes = 889523592379ULL;
424 static const U64 prime8bytes = 11400714785074694791ULL;
427 return (
U32)(((sequence << 24) * prime5bytes) >> (64 - hashLog));
429 return (
U32)(((sequence >> 24) * prime8bytes) >> (64 - hashLog));
442 case byPtr: {
const BYTE** hashTable = (
const BYTE**)tableBase; hashTable[
h] =
p;
return; }
443 case byU32: {
U32* hashTable = (
U32*) tableBase; hashTable[
h] = (
U32)(p-srcBase);
return; }
444 case byU16: {
U16* hashTable = (
U16*) tableBase; hashTable[
h] = (
U16)(p-srcBase);
return; }
456 if (tableType ==
byPtr) {
const BYTE** hashTable = (
const BYTE**) tableBase;
return hashTable[
h]; }
457 if (tableType ==
byU32) {
const U32*
const hashTable = (
U32*) tableBase;
return hashTable[
h] + srcBase; }
458 {
const U16*
const hashTable = (
U16*) tableBase;
return hashTable[
h] + srcBase; }
477 const tableType_t tableType,
478 const dict_directive dict,
479 const dictIssue_directive dictIssue,
480 const U32 acceleration)
482 const BYTE* ip = (
const BYTE*) source;
484 const BYTE* lowLimit;
487 const BYTE*
const dictEnd = dictionary + cctx->
dictSize;
488 const ptrdiff_t dictDelta = dictEnd - (
const BYTE*)source;
489 const BYTE* anchor = (
const BYTE*) source;
505 base = (
const BYTE*)source;
506 lowLimit = (
const BYTE*)source;
526 ptrdiff_t refDelta = 0;
531 {
const BYTE* forwardIp = ip;
535 U32 const h = forwardH;
540 if (
unlikely(forwardIp > mflimit))
goto _last_literals;
544 if (match < (
const BYTE*)source) {
545 refDelta = dictDelta;
546 lowLimit = dictionary;
549 lowLimit = (
const BYTE*)source;
554 }
while ( ((dictIssue==
dictSmall) ? (match < lowRefLimit) : 0)
560 while (((ip>anchor) & (match+refDelta > lowLimit)) && (
unlikely(ip[-1]==match[refDelta-1]))) { ip--; match--; }
563 {
unsigned const litLength = (unsigned)(ip - anchor);
565 if ((outputLimited) &&
566 (
unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)))
571 for(; len >= 255 ; len-=255) *op++ = 255;
586 {
unsigned matchCode;
591 limit = ip + (dictEnd-match);
592 if (limit > matchlimit) limit = matchlimit;
596 unsigned const more =
LZ4_count(ip, (
const BYTE*)source, matchlimit);
605 if ( outputLimited &&
606 (
unlikely(op + (1 + LASTLITERALS) + (matchCode>>8) > olimit)) )
612 while (matchCode >= 4*255) op+=4,
LZ4_write32(op, 0xFFFFFFFF), matchCode -= 4*255;
613 op += matchCode / 255;
614 *op++ = (
BYTE)(matchCode % 255);
616 *token += (
BYTE)(matchCode);
622 if (ip > mflimit)
break;
630 if (match < (
const BYTE*)source) {
631 refDelta = dictDelta;
632 lowLimit = dictionary;
635 lowLimit = (
const BYTE*)source;
638 if ( ((dictIssue==
dictSmall) ? (match>=lowRefLimit) : 1)
641 { token=op++; *token=0;
goto _next_match; }
649 {
size_t const lastRun = (
size_t)(iend - anchor);
650 if ( (outputLimited) &&
651 ((op - (
BYTE*)dest) + lastRun + 1 + ((lastRun+255-
RUN_MASK)/255) > (
U32)maxOutputSize) )
654 size_t accumulator = lastRun -
RUN_MASK;
656 for(; accumulator >= 255 ; accumulator-=255) *op++ = 255;
657 *op++ = (
BYTE) accumulator;
661 memcpy(op, anchor, lastRun);
666 return (
int) (((
char*)op)-
dest);
696 void*
const ctxPtr = &
ctx;
734 const char*
const src,
736 int*
const srcSizePtr,
737 const int targetDstSize,
738 const tableType_t tableType)
741 const BYTE* base = (
const BYTE*) src;
742 const BYTE* lowLimit = (
const BYTE*) src;
743 const BYTE* anchor = ip;
744 const BYTE*
const iend = ip + *srcSizePtr;
749 BYTE*
const oend = op + targetDstSize;
750 BYTE*
const oMaxLit = op + targetDstSize - 2 - 8 - 1 ;
751 BYTE*
const oMaxMatch = op + targetDstSize - (LASTLITERALS + 1 );
752 BYTE*
const oMaxSeq = oMaxLit - 1 ;
758 if (targetDstSize < 1)
return 0;
774 {
const BYTE* forwardIp = ip;
784 if (
unlikely(forwardIp > mflimit))
goto _last_literals;
795 while ((ip>anchor) && (match > lowLimit) && (
unlikely(ip[-1]==match[-1]))) { ip--; match--; }
798 {
unsigned litLength = (unsigned)(ip - anchor);
800 if (op + ((litLength+240)/255) + litLength > oMaxLit) {
808 for(; len >= 255 ; len-=255) *op++ = 255;
825 if (op + ((matchLength+240)/255) > oMaxMatch) {
827 matchLength = (15-1) + (oMaxMatch-op) * 255;
834 while (matchLength >= 255) { matchLength-=255; *op++ = 255; }
835 *op++ = (
BYTE)matchLength;
837 else *token += (
BYTE)(matchLength);
843 if (ip > mflimit)
break;
844 if (op > oMaxSeq)
break;
854 { token=op++; *token=0;
goto _next_match; }
862 {
size_t lastRunSize = (
size_t)(iend - anchor);
863 if (op + 1 + ((lastRunSize+240)/255) + lastRunSize > oend) {
865 lastRunSize = (oend-op) - 1;
866 lastRunSize -= (lastRunSize+240)/255;
868 ip = anchor + lastRunSize;
871 size_t accumulator = lastRunSize -
RUN_MASK;
873 for(; accumulator >= 255 ; accumulator-=255) *op++ = 255;
874 *op++ = (
BYTE) accumulator;
878 memcpy(op, anchor, lastRunSize);
883 *srcSizePtr = (int) (((
const char*)ip)-
src);
884 return (
int) (((
char*)op)-
dst);
946 #define HASH_UNIT sizeof(reg_t) 951 const BYTE*
const dictEnd = p + dictSize;
963 if ((dictEnd - p) > 64
KB) p = dictEnd - 64
KB;
970 while (p <= dictEnd-HASH_UNIT) {
1003 const BYTE* smallest = (
const BYTE*) source;
1005 if ((streamPtr->
dictSize>0) && (smallest>dictEnd)) smallest = dictEnd;
1010 {
const BYTE* sourceEnd = (
const BYTE*) source + inputSize;
1011 if ((sourceEnd > streamPtr->
dictionary) && (sourceEnd < dictEnd)) {
1052 const BYTE* smallest = dictEnd;
1053 if (smallest > (
const BYTE*) source) smallest = (
const BYTE*) source;
1078 if ((
U32)dictSize > 64
KB) dictSize = 64
KB;
1081 memmove(safeBuffer, previousDictEnd - dictSize, dictSize);
1101 const char*
const source,
1107 int partialDecoding,
1108 int targetOutputSize,
1110 const BYTE*
const lowPrefix,
1111 const BYTE*
const dictStart,
1112 const size_t dictSize
1116 const BYTE* ip = (
const BYTE*) source;
1122 BYTE* oexit = op + targetOutputSize;
1123 const BYTE*
const lowLimit = lowPrefix - dictSize;
1125 const BYTE*
const dictEnd = (
const BYTE*)dictStart + dictSize;
1126 const unsigned dec32table[] = {0, 1, 2, 1, 4, 4, 4, 4};
1127 const int dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3};
1130 const int checkOffset = ((safeDecode) && (dictSize < (
int)(64
KB)));
1134 if ((partialDecoding) && (oexit > oend-
MFLIMIT)) oexit = oend-
MFLIMIT;
1135 if ((endOnInput) && (
unlikely(outputSize==0)))
return ((inputSize==1) && (*ip==0)) ? 0 : -1;
1136 if ((!endOnInput) && (
unlikely(outputSize==0)))
return (*ip==0?1:-1);
1145 unsigned const token = *ip++;
1151 }
while (
likely(endOnInput ? ip<iend-
RUN_MASK : 1) & (s==255) );
1158 if ( ((endOnInput) && ((cpy>(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+
LASTLITERALS))) )
1161 if (partialDecoding) {
1162 if (cpy > oend)
goto _output_error;
1163 if ((endOnInput) && (ip+length > iend))
goto _output_error;
1165 if ((!endOnInput) && (cpy != oend))
goto _output_error;
1166 if ((endOnInput) && ((ip+length != iend) || (cpy > oend)))
goto _output_error;
1168 memcpy(op, ip, length);
1179 if ((checkOffset) && (
unlikely(match < lowLimit)))
goto _output_error;
1184 if (length == ML_MASK) {
1188 if ((endOnInput) && (ip > iend-
LASTLITERALS))
goto _output_error;
1199 if (length <= (
size_t)(lowPrefix-match)) {
1201 memmove(op, dictEnd - (lowPrefix-match), length);
1205 size_t const copySize = (
size_t)(lowPrefix-match);
1206 size_t const restSize = length - copySize;
1207 memcpy(op, dictEnd - copySize, copySize);
1209 if (restSize > (
size_t)(op-lowPrefix)) {
1210 BYTE*
const endOfMatch = op + restSize;
1211 const BYTE* copyFrom = lowPrefix;
1212 while (op < endOfMatch) *op++ = *copyFrom++;
1214 memcpy(op, lowPrefix, restSize);
1223 const int dec64 = dec64table[
offset];
1228 match += dec32table[
offset];
1229 memcpy(op+4, match, 4);
1231 }
else {
LZ4_copy8(op, match); match+=8; }
1237 if (op < oCopyLimit) {
1239 match += oCopyLimit - op;
1242 while (op<cpy) *op++ = *match++;
1252 return (
int) (((
char*)op)-
dest);
1254 return (
int) (((
const char*)ip)-
source);
1258 return (
int) (-(((
const char*)ip)-
source))-1;
1264 return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize,
endOnInputSize,
full, 0,
noDict, (
BYTE*)dest,
NULL, 0);
1269 return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize,
endOnInputSize,
partial, targetOutputSize,
noDict, (
BYTE*)dest,
NULL, 0);
1274 return LZ4_decompress_generic(source, dest, 0, originalSize,
endOnOutputSize,
full, 0,
withPrefix64k, (
BYTE*)(dest - 64
KB),
NULL, 64
KB);
1330 if (result <= 0)
return result;
1339 if (result <= 0)
return result;
1356 if (result <= 0)
return result;
1365 if (result <= 0)
return result;
1384 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe,
full, 0,
noDict, (
BYTE*)dest,
NULL, 0);
1385 if (dictStart+dictSize == dest) {
1386 if (dictSize >= (
int)(64
KB - 1))
1387 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe,
full, 0,
withPrefix64k, (
BYTE*)dest-64
KB,
NULL, 0);
1388 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe,
full, 0,
noDict, (
BYTE*)dest-dictSize,
NULL, 0);
1390 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe,
full, 0,
usingExtDict, (
BYTE*)dest, (
const BYTE*)dictStart, dictSize);
1406 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize,
endOnInputSize,
full, 0,
usingExtDict, (
BYTE*)dest, (
const BYTE*)dictStart, dictSize);
1443 if ((((
uptrval)state) & 3) != 0)
return 1;
1466 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize,
endOnInputSize,
full, 0,
withPrefix64k, (
BYTE*)dest - 64
KB,
NULL, 64
KB);
1471 return LZ4_decompress_generic(source, dest, 0, originalSize,
endOnOutputSize,
full, 0,
withPrefix64k, (
BYTE*)dest - 64
KB,
NULL, 64
KB);
void * LZ4_create(char *inputBuffer)
int LZ4_compress_destSize(const char *src, char *dst, int *srcSizePtr, int targetDstSize)
LZ4_stream_t * LZ4_createStream(void)
char * LZ4_slideInputBuffer(void *LZ4_Data)
int LZ4_compress_fast_force(const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
FORCE_INLINE int LZ4_compress_generic(LZ4_stream_t_internal *const cctx, const char *const source, char *const dest, const int inputSize, const int maxOutputSize, const limitedOutput_directive outputLimited, const tableType_t tableType, const dict_directive dict, const dictIssue_directive dictIssue, const U32 acceleration)
static reg_t LZ4_read_ARCH(const void *memPtr)
LZ4_streamDecode_t_internal internal_donotuse
int LZ4_loadDict(LZ4_stream_t *LZ4_dict, const char *dictionary, int dictSize)
int LZ4_compress_limitedOutput(const char *source, char *dest, int inputSize, int maxOutputSize)
int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
static int LZ4_compress_destSize_generic(LZ4_stream_t_internal *const ctx, const char *const src, char *const dst, int *const srcSizePtr, const int targetDstSize, const tableType_t tableType)
#define LZ4_HASH_SIZE_U32
int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
GLuint GLenum GLsizei GLsizei GLint GLint GLboolean packed
static void LZ4_init(LZ4_stream_t *lz4ds, BYTE *base)
unsigned int currentOffset
static const U32 LZ4_skipTrigger
int LZ4_decompress_safe_partial(const char *source, char *dest, int compressedSize, int targetOutputSize, int maxDecompressedSize)
int LZ4_resetStreamState(void *state, char *inputBuffer)
int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize)
LZ4LIB_API char * inputBuffer
#define LZ4_STREAMSIZE_U64
#define ACCELERATION_DEFAULT
unsigned char * bufferStart
int LZ4_freeStreamDecode(LZ4_streamDecode_t *LZ4_stream)
int LZ4_compress_forceExtDict(LZ4_stream_t *LZ4_dict, const char *source, char *dest, int inputSize)
LZ4_streamDecode_t * LZ4_createStreamDecode(void)
int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest, int compressedSize, int maxOutputSize)
static U16 LZ4_read16(const void *memPtr)
const unsigned char * prefixEnd
int LZ4_decompress_safe(const char *source, char *dest, int compressedSize, int maxDecompressedSize)
int LZ4_compress_fast_extState(void *state, const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
static void LZ4_renormDictT(LZ4_stream_t_internal *LZ4_dict, const BYTE *src)
int LZ4_compress_default(const char *source, char *dest, int inputSize, int maxOutputSize)
GLfloat GLfloat GLfloat GLfloat h
int LZ4_uncompress(const char *source, char *dest, int outputSize)
int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int compressedSize, int maxOutputSize)
int LZ4_decompress_fast_withPrefix64k(const char *source, char *dest, int originalSize)
static U32 LZ4_hash4(U32 sequence, tableType_t const tableType)
const unsigned char * externalDict
static U16 LZ4_readLE16(const void *memPtr)
LZ4LIB_API char int originalSize
FORCE_INLINE const BYTE * LZ4_getPosition(const BYTE *p, void *tableBase, tableType_t tableType, const BYTE *srcBase)
int LZ4_decompress_safe_forceExtDict(const char *source, char *dest, int compressedSize, int maxOutputSize, const char *dictStart, int dictSize)
unsigned int hashTable[LZ4_HASH_SIZE_U32]
static void LZ4_write32(void *memPtr, U32 value)
int LZ4_decompress_safe_usingDict(const char *source, char *dest, int compressedSize, int maxOutputSize, const char *dictStart, int dictSize)
int LZ4_compress_withState(void *state, const char *src, char *dst, int srcSize)
static void LZ4_write16(void *memPtr, U16 value)
static void LZ4_copy8(void *dst, const void *src)
int LZ4_compress_fast(const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
int LZ4_freeStream(LZ4_stream_t *LZ4_stream)
static unsigned LZ4_isLittleEndian(void)
_W64 unsigned int uintptr_t
int LZ4_versionNumber(void)
void LZ4_resetStream(LZ4_stream_t *LZ4_stream)
#define LZ4_VERSION_STRING
static void LZ4_putPositionOnHash(const BYTE *p, U32 h, void *tableBase, tableType_t const tableType, const BYTE *srcBase)
static const int LZ4_minLength
unsigned __int64 uint64_t
static void LZ4_writeLE16(void *memPtr, U16 value)
LZ4LIB_API char int isize
static U32 LZ4_hash5(U64 sequence, tableType_t const tableType)
LZ4_stream_t_internal internal_donotuse
int LZ4_compress_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize)
static void LZ4_wildCopy(void *dstPtr, const void *srcPtr, void *dstEnd)
static U32 LZ4_read32(const void *memPtr)
static unsigned LZ4_NbCommonBytes(register reg_t val)
int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize)
LZ4LIB_API char int compressedSize
#define LZ4_STATIC_ASSERT(c)
FORCE_INLINE int LZ4_decompress_generic(const char *const source, char *const dest, int inputSize, int outputSize, int endOnInput, int partialDecoding, int targetOutputSize, int dict, const BYTE *const lowPrefix, const BYTE *const dictStart, const size_t dictSize)
#define LZ4_MAX_INPUT_SIZE
FORCE_INLINE void LZ4_putPosition(const BYTE *p, void *tableBase, tableType_t tableType, const BYTE *srcBase)
LZ4LIB_API const char char int inputSize
int LZ4_compress_limitedOutput_withState(void *state, const char *src, char *dst, int srcSize, int dstSize)
FORCE_INLINE int LZ4_decompress_usingDict_generic(const char *source, char *dest, int compressedSize, int maxOutputSize, int safe, const char *dictStart, int dictSize)
LZ4LIB_API char int outputSize
#define LZ4_VERSION_NUMBER
int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int originalSize)
static const int LZ4_64Klimit
LZ4LIB_API char int int maxDstSize
LZ4LIB_API char int int maxOutputSize
int LZ4_sizeofStreamState()
const char * LZ4_versionString(void)
int LZ4_compress_limitedOutput_continue(LZ4_stream_t *LZ4_stream, const char *src, char *dst, int srcSize, int maxDstSize)
int LZ4_compress(const char *source, char *dest, int inputSize)
GLsizei GLsizei GLchar * source
int LZ4_compressBound(int isize)
GLenum GLuint GLenum GLsizei length
FORCE_INLINE U32 LZ4_hashPosition(const void *const p, tableType_t const tableType)
const unsigned char * dictionary
#define LZ4_COMPRESSBOUND(isize)
static const BYTE * LZ4_getPositionOnHash(U32 h, void *tableBase, tableType_t tableType, const BYTE *srcBase)
int LZ4_saveDict(LZ4_stream_t *LZ4_dict, char *safeBuffer, int dictSize)
static int LZ4_compress_destSize_extState(LZ4_stream_t *state, const char *src, char *dst, int *srcSizePtr, int targetDstSize)
static unsigned LZ4_count(const BYTE *pIn, const BYTE *pMatch, const BYTE *pInLimit)
int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)