45 # pragma warning(disable : 4127) 53 #define ALLOCATOR(s) calloc(1,s) 56 #define MEM_INIT memset 65 #define XXH_STATIC_LINKING_ONLY 72 #define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } 78 #if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) ) 86 typedef unsigned char BYTE;
87 typedef unsigned short U16;
88 typedef unsigned int U32;
89 typedef signed int S32;
90 typedef unsigned long long U64;
97 const BYTE*
const srcPtr = (
const BYTE*)src;
98 U32 value32 = srcPtr[0];
99 value32 += (srcPtr[1]<<8);
100 value32 += (srcPtr[2]<<16);
101 value32 += ((
U32)srcPtr[3])<<24;
108 dstPtr[0] = (
BYTE)value32;
109 dstPtr[1] = (
BYTE)(value32 >> 8);
110 dstPtr[2] = (
BYTE)(value32 >> 16);
111 dstPtr[3] = (
BYTE)(value32 >> 24);
116 const BYTE*
const srcPtr = (
const BYTE*)src;
117 U64 value64 = srcPtr[0];
118 value64 += ((
U64)srcPtr[1]<<8);
119 value64 += ((
U64)srcPtr[2]<<16);
120 value64 += ((
U64)srcPtr[3]<<24);
121 value64 += ((
U64)srcPtr[4]<<32);
122 value64 += ((
U64)srcPtr[5]<<40);
123 value64 += ((
U64)srcPtr[6]<<48);
124 value64 += ((
U64)srcPtr[7]<<56);
131 dstPtr[0] = (
BYTE)value64;
132 dstPtr[1] = (
BYTE)(value64 >> 8);
133 dstPtr[2] = (
BYTE)(value64 >> 16);
134 dstPtr[3] = (
BYTE)(value64 >> 24);
135 dstPtr[4] = (
BYTE)(value64 >> 32);
136 dstPtr[5] = (
BYTE)(value64 >> 40);
137 dstPtr[6] = (
BYTE)(value64 >> 48);
138 dstPtr[7] = (
BYTE)(value64 >> 56);
155 #define LZ4F_MAGIC_SKIPPABLE_START 0x184D2A50U 156 #define LZ4F_MAGICNUMBER 0x184D2204U 157 #define LZ4F_BLOCKUNCOMPRESSED_FLAG 0x80000000U 158 #define LZ4F_BLOCKSIZEID_DEFAULT LZ4F_max64KB 188 #define LZ4F_GENERATE_STRING(STRING) #STRING, 199 static const char* codeError =
"Unspecified error code";
206 if (!
LZ4F_isError(functionResult))
return LZ4F_OK_NoError;
223 #define MIN(a,b) ( (a) < (b) ? (a) : (b) ) 227 static const size_t blockSizes[4] = { 64
KB, 256
KB, 1
MB, 4 MB };
231 if (blockSizeID > 3)
return err0r(LZ4F_ERROR_maxBlockSize_invalid);
232 return blockSizes[blockSizeID];
238 return (
BYTE)(xxh >> 8);
246 const size_t srcSize)
250 while (requestedBSID > proposedBSID) {
251 if (srcSize <= maxBlockSize)
256 return requestedBSID;
267 size_t alreadyBuffered)
270 memset(&prefsNull, 0,
sizeof(prefsNull));
276 size_t const maxBuffered = blockSize - 1;
277 size_t const bufferedSize =
MIN(alreadyBuffered, maxBuffered);
278 size_t const maxSrcSize = srcSize + bufferedSize;
279 unsigned const nbFullBlocks = (unsigned)(maxSrcSize / blockSize);
280 size_t const partialBlockSize = (srcSize - (srcSize==0)) & (blockSize-1);
281 size_t const lastBlockSize = flush ? partialBlockSize : 0;
282 unsigned const nbBlocks = nbFullBlocks + (lastBlockSize>0);
284 size_t const blockHeaderSize = 4;
287 return (blockHeaderSize * nbBlocks) + (blockSize * nbFullBlocks) + lastBlockSize + frameEnd;;
296 if (preferencesPtr!=
NULL) prefs = *preferencesPtr;
297 else memset(&prefs, 0,
sizeof(prefs));
319 BYTE*
const dstStart = (
BYTE*) dstBuffer;
320 BYTE* dstPtr = dstStart;
321 BYTE*
const dstEnd = dstStart + dstCapacity;
323 memset(&cctxI, 0,
sizeof(cctxI));
324 memset(&options, 0,
sizeof(options));
329 if (preferencesPtr!=
NULL)
330 prefs = *preferencesPtr;
332 memset(&prefs, 0,
sizeof(prefs));
349 return err0r(LZ4F_ERROR_dstMaxSize_tooSmall);
351 {
size_t const headerSize =
LZ4F_compressBegin(&cctxI, dstBuffer, dstCapacity, &prefs);
353 dstPtr += headerSize; }
355 {
size_t const cSize =
LZ4F_compressUpdate(&cctxI, dstPtr, dstEnd-dstPtr, srcBuffer, srcSize, &options);
359 {
size_t const tailSize =
LZ4F_compressEnd(&cctxI, dstPtr, dstEnd-dstPtr, &options);
361 dstPtr += tailSize; }
366 return (dstPtr - dstStart);
385 if (cctxPtr==
NULL)
return err0r(LZ4F_ERROR_allocation_failed);
392 return LZ4F_OK_NoError;
400 if (cctxPtr !=
NULL) {
403 FREEMEM(LZ4F_compressionContext);
406 return LZ4F_OK_NoError;
419 BYTE*
const dstStart = (
BYTE*)dstBuffer;
420 BYTE* dstPtr = dstStart;
422 size_t requiredBuffSize;
424 if (dstCapacity < maxFHSize)
return err0r(LZ4F_ERROR_dstMaxSize_tooSmall);
425 if (cctxPtr->
cStage != 0)
return err0r(LZ4F_ERROR_GENERIC);
426 memset(&prefNull, 0,
sizeof(prefNull));
427 if (preferencesPtr ==
NULL) preferencesPtr = &prefNull;
428 cctxPtr->
prefs = *preferencesPtr;
469 headerStart = dstPtr;
490 return (dstPtr - dstStart);
511 U32 cSize = (
U32)compress(lz4ctx, (
const char*)
src, (
char*)(cSizePtr+4), (int)(srcSize), (int)(srcSize-1),
level);
514 cSize = (
U32)srcSize;
516 memcpy(cSizePtr+4, src, srcSize);
524 int const acceleration = (level < -1) ? -level : 1;
530 int const acceleration = (level < -1) ? -level : 1;
572 const BYTE* srcPtr = (
const BYTE*)srcBuffer;
573 const BYTE*
const srcEnd = srcPtr + srcSize;
574 BYTE*
const dstStart = (
BYTE*)dstBuffer;
575 BYTE* dstPtr = dstStart;
580 if (cctxPtr->
cStage != 1)
return err0r(LZ4F_ERROR_GENERIC);
582 memset(&cOptionsNull, 0,
sizeof(cOptionsNull));
583 if (compressOptionsPtr ==
NULL) compressOptionsPtr = &cOptionsNull;
587 size_t const sizeToCopy = blockSize - cctxPtr->
tmpInSize;
588 if (sizeToCopy > srcSize) {
597 memcpy(cctxPtr->
tmpIn + cctxPtr->
tmpInSize, srcBuffer, sizeToCopy);
598 srcPtr += sizeToCopy;
607 while ((
size_t)(srcEnd - srcPtr) >= blockSize) {
627 if (realDictSize==0)
return err0r(LZ4F_ERROR_GENERIC);
641 if (srcPtr < srcEnd) {
643 size_t const sizeToCopy = srcEnd - srcPtr;
644 memcpy(cctxPtr->
tmpIn, srcPtr, sizeToCopy);
652 return dstPtr - dstStart;
666 BYTE*
const dstStart = (
BYTE*)dstBuffer;
667 BYTE* dstPtr = dstStart;
671 if (cctxPtr->
cStage != 1)
return err0r(LZ4F_ERROR_GENERIC);
672 if (dstCapacity < (cctxPtr->
tmpInSize + 4))
return err0r(LZ4F_ERROR_dstMaxSize_tooSmall);
673 (
void)compressOptionsPtr;
689 return dstPtr - dstStart;
704 BYTE*
const dstStart = (
BYTE*)dstBuffer;
705 BYTE* dstPtr = dstStart;
707 size_t const flushSize =
LZ4F_flush(cctxPtr, dstBuffer, dstMaxSize, compressOptionsPtr);
725 return err0r(LZ4F_ERROR_frameSize_wrong);
728 return dstPtr - dstStart;
766 if (dctxPtr==
NULL)
return err0r(LZ4F_ERROR_GENERIC);
768 dctxPtr->
version = versionNumber;
769 *LZ4F_decompressionContextPtr = dctxPtr;
770 return LZ4F_OK_NoError;
776 if (dctxPtr !=
NULL) {
814 if (srcSize < 5)
return err0r(LZ4F_ERROR_frameHeader_incomplete);
823 {
BYTE const FLG = ((
const BYTE*)src)[4];
824 U32 const contentSizeFlag = (FLG>>3) &
_1BIT;
825 return contentSizeFlag ? maxFHSize :
minFHSize;
840 unsigned blockMode, contentSizeFlag, contentChecksumFlag, blockSizeID;
841 size_t frameHeaderSize;
842 const BYTE* srcPtr = (
const BYTE*)src;
845 if (srcSize < minFHSize)
return err0r(LZ4F_ERROR_frameHeader_incomplete);
851 if (src == (
void*)(dctxPtr->
header)) {
867 {
U32 const FLG = srcPtr[4];
869 U32 const blockChecksumFlag = (FLG>>4) &
_1BIT;
870 blockMode = (FLG>>5) &
_1BIT;
871 contentSizeFlag = (FLG>>3) &
_1BIT;
872 contentChecksumFlag = (FLG>>2) &
_1BIT;
874 if (((FLG>>0)&
_2BITS) != 0)
return err0r(LZ4F_ERROR_reservedFlag_set);
875 if (version != 1)
return err0r(LZ4F_ERROR_headerVersion_wrong);
876 if (blockChecksumFlag != 0)
return err0r(LZ4F_ERROR_blockChecksum_unsupported);
880 frameHeaderSize = contentSizeFlag ? maxFHSize :
minFHSize;
882 if (srcSize < frameHeaderSize) {
884 if (srcPtr != dctxPtr->
header)
885 memcpy(dctxPtr->
header, srcPtr, srcSize);
892 {
U32 const BD = srcPtr[5];
893 blockSizeID = (BD>>4) &
_3BITS;
895 if (((BD>>7)&
_1BIT) != 0)
return err0r(LZ4F_ERROR_reservedFlag_set);
896 if (blockSizeID < 4)
return err0r(LZ4F_ERROR_maxBlockSize_invalid);
897 if (((BD>>0)&
_4BITS) != 0)
return err0r(LZ4F_ERROR_reservedFlag_set);
902 if (HC != srcPtr[frameHeaderSize-1])
return err0r(LZ4F_ERROR_headerChecksum_invalid); }
914 return frameHeaderSize;
934 const void* srcBuffer,
size_t* srcSizePtr)
947 return err0r(LZ4F_ERROR_frameDecoding_alreadyStarted);
951 if (
LZ4F_isError(hSize)) { *srcSizePtr=0;
return hSize; }
952 if (*srcSizePtr < hSize) {
954 return err0r(LZ4F_ERROR_frameHeader_incomplete);
961 *srcSizePtr = decodeResult;
975 const char* dictStart,
986 dctxPtr->
dict = (
const BYTE*)dstPtr;
993 if (dstPtr - dstPtr0 + dstSize >= 64
KB) {
994 dctxPtr->
dict = (
const BYTE*)dstPtr0;
995 dctxPtr->
dictSize = dstPtr - dstPtr0 + dstSize;
1010 if (copySize > preserveSize) copySize = preserveSize;
1012 memcpy(dctxPtr->
tmpOutBuffer + preserveSize - copySize, oldDictEnd - copySize, copySize);
1021 size_t const preserveSize = 64
KB - dstSize;
1031 {
size_t preserveSize = 64
KB - dstSize;
1034 memcpy(dctxPtr->
tmpOutBuffer + preserveSize, dstPtr, dstSize);
1036 dctxPtr->
dictSize = preserveSize + dstSize;
1060 void* dstBuffer,
size_t* dstSizePtr,
1061 const void* srcBuffer,
size_t* srcSizePtr,
1065 const BYTE*
const srcStart = (
const BYTE*)srcBuffer;
1066 const BYTE*
const srcEnd = srcStart + *srcSizePtr;
1067 const BYTE* srcPtr = srcStart;
1068 BYTE*
const dstStart = (
BYTE*)dstBuffer;
1069 BYTE*
const dstEnd = dstStart + *dstSizePtr;
1070 BYTE* dstPtr = dstStart;
1072 unsigned doAnotherStage = 1;
1073 size_t nextSrcSizeHint = 1;
1076 memset(&optionsNull, 0,
sizeof(optionsNull));
1077 if (decompressOptionsPtr==
NULL) decompressOptionsPtr = &optionsNull;
1083 while (doAnotherStage) {
1089 if ((
size_t)(srcEnd-srcPtr) >= maxFHSize) {
1096 if (srcEnd-srcPtr == 0)
return minFHSize;
1103 if (sizeToCopy > (
size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1106 srcPtr += sizeToCopy;
1126 if (dctxPtr->
tmpIn ==
NULL)
return err0r(LZ4F_ERROR_allocation_failed);
1144 if ((
size_t)(srcEnd - srcPtr) >= BHSize) {
1145 selectedIn = srcPtr;
1155 {
size_t sizeToCopy = BHSize - dctxPtr->
tmpInSize;
1156 if (sizeToCopy > (
size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1158 srcPtr += sizeToCopy;
1161 nextSrcSizeHint = BHSize - dctxPtr->
tmpInSize;
1165 selectedIn = dctxPtr->
tmpIn;
1169 {
size_t const nextCBlockSize =
LZ4F_readLE32(selectedIn) & 0x7FFFFFFFU;
1170 if (nextCBlockSize==0) {
1175 return err0r(LZ4F_ERROR_maxBlockSize_invalid);
1182 if (dstPtr==dstEnd) {
1183 nextSrcSizeHint = nextCBlockSize +
BHSize;
1191 if ((
size_t)(srcEnd-srcPtr) < sizeToCopy) sizeToCopy = srcEnd - srcPtr;
1192 if ((
size_t)(dstEnd-dstPtr) < sizeToCopy) sizeToCopy = dstEnd - dstPtr;
1193 memcpy(dstPtr, srcPtr, sizeToCopy);
1203 srcPtr += sizeToCopy;
1204 dstPtr += sizeToCopy;
1216 if ((
size_t)(srcEnd-srcPtr) < dctxPtr->
tmpInTarget) {
1221 selectedIn = srcPtr;
1228 if (sizeToCopy > (
size_t)(srcEnd-srcPtr)) sizeToCopy = srcEnd-srcPtr;
1231 srcPtr += sizeToCopy;
1237 selectedIn = dctxPtr->
tmpIn;
1250 { int (*decoder)(
const char*,
char*, int, int,
const char*, int);
1258 decodedSize = decoder((
const char*)selectedIn, (
char*)dstPtr,
1261 if (decodedSize < 0)
return err0r(LZ4F_ERROR_GENERIC);
1271 dstPtr += decodedSize;
1278 { int (*decoder)(
const char*,
char*, int, int,
const char*, int);
1295 size_t reservedDictSpace = dctxPtr->
dictSize;
1296 if (reservedDictSpace > 64
KB) reservedDictSpace = 64
KB;
1302 decodedSize = decoder((
const char*)selectedIn, (
char*)dctxPtr->
tmpOut,
1305 if (decodedSize < 0)
1306 return err0r(LZ4F_ERROR_decompressionFailed);
1319 if (sizeToCopy > (
size_t)(dstEnd-dstPtr)) sizeToCopy = dstEnd-dstPtr;
1327 dstPtr += sizeToCopy;
1334 nextSrcSizeHint =
BHSize;
1342 return err0r(LZ4F_ERROR_frameSize_wrong);
1343 if (suffixSize == 0) {
1344 nextSrcSizeHint = 0;
1349 if ((srcEnd - srcPtr) < 4) {
1353 selectedIn = srcPtr;
1361 size_t sizeToCopy = 4 - dctxPtr->
tmpInSize;
1362 if (sizeToCopy > (
size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1364 srcPtr += sizeToCopy;
1367 nextSrcSizeHint = 4 - dctxPtr->
tmpInSize;
1371 selectedIn = dctxPtr->
tmpIn;
1377 if (readCRC != resultCRC)
return err0r(LZ4F_ERROR_contentChecksum_invalid);
1378 nextSrcSizeHint = 0;
1385 if ((srcEnd - srcPtr) >= 4) {
1386 selectedIn = srcPtr;
1399 if (sizeToCopy > (
size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1401 srcPtr += sizeToCopy;
1409 selectedIn = dctxPtr->
header + 4;
1422 if (skipSize > (
size_t)(srcEnd-srcPtr)) skipSize = srcEnd-srcPtr;
1427 if (nextSrcSizeHint)
break;
1446 if (copySize > preserveSize) copySize = preserveSize;
1448 memcpy(dctxPtr->
tmpOutBuffer + preserveSize - copySize, oldDictEnd - copySize, copySize);
1453 size_t newDictSize = dctxPtr->
dictSize;
1455 if ((newDictSize) > 64
KB) newDictSize = 64
KB;
1457 memcpy(dctxPtr->
tmpOutBuffer, oldDictEnd - newDictSize, newDictSize);
1465 *srcSizePtr = (srcPtr - srcStart);
1466 *dstSizePtr = (dstPtr - dstStart);
1467 return nextSrcSizeHint;
size_t LZ4F_compressEnd(LZ4F_cctx *cctxPtr, void *dstBuffer, size_t dstMaxSize, const LZ4F_compressOptions_t *compressOptionsPtr)
LZ4_stream_t * LZ4_createStream(void)
static BYTE LZ4F_headerChecksum(const void *header, size_t length)
LZ4F_errorCode_t LZ4F_getFrameInfo(LZ4F_dctx *dctxPtr, LZ4F_frameInfo_t *frameInfoPtr, const void *srcBuffer, size_t *srcSizePtr)
size_t LZ4F_compressBegin(LZ4F_cctx *cctxPtr, void *dstBuffer, size_t dstCapacity, const LZ4F_preferences_t *preferencesPtr)
static const size_t minFHSize
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
static LZ4F_blockSizeID_t LZ4F_optimalBSID(const LZ4F_blockSizeID_t requestedBSID, const size_t srcSize)
unsigned LZ4F_isError(LZ4F_errorCode_t code)
LZ4F_contentChecksum_t contentChecksumFlag
LZ4F_errorCode_t LZ4F_createDecompressionContext(LZ4F_dctx **LZ4F_decompressionContextPtr, unsigned versionNumber)
static size_t LZ4F_headerSize(const void *src, size_t srcSize)
#define LZ4F_BLOCKSIZEID_DEFAULT
static int LZ4F_localLZ4_compress_limitedOutput_withState(void *ctx, const char *src, char *dst, int srcSize, int dstCapacity, int level)
LZ4F_frameType_t frameType
void LZ4_resetStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
size_t LZ4F_compressUpdate(LZ4F_cctx *cctxPtr, void *dstBuffer, size_t dstCapacity, const void *srcBuffer, size_t srcSize, const LZ4F_compressOptions_t *compressOptionsPtr)
XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t *statePtr, unsigned int seed)
LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx *dctxPtr)
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)
std_msgs::Header * header(M &m)
returns Header<M>::pointer(m);
XXH_PUBLIC_API unsigned int XXH32_digest(const XXH32_state_t *state_in)
LZ4_streamHC_t * LZ4_createStreamHC(void)
LZ4F_errorCode_t LZ4F_createCompressionContext(LZ4F_compressionContext_t *LZ4F_compressionContextPtr, unsigned version)
static compressFunc_t LZ4F_selectCompression(LZ4F_blockMode_t blockMode, int level)
size_t LZ4F_decompress(LZ4F_dctx *dctxPtr, void *dstBuffer, size_t *dstSizePtr, const void *srcBuffer, size_t *srcSizePtr, const LZ4F_decompressOptions_t *decompressOptionsPtr)
static int LZ4F_decompress_safe(const char *src, char *dst, int compressedSize, int dstCapacity, const char *dictStart, int dictSize)
LZ4F_errorCodes LZ4F_getErrorCode(size_t functionResult)
#define LZ4F_MAGIC_SKIPPABLE_START
static U64 LZ4F_readLE64(const void *src)
int LZ4_decompress_safe_usingDict(const char *source, char *dest, int compressedSize, int maxOutputSize, const char *dictStart, int dictSize)
LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_compressionContext_t LZ4F_compressionContext)
struct XXH32_state_s XXH32_state_t
size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t *preferencesPtr)
#define LZ4F_BLOCKUNCOMPRESSED_FLAG
LZ4F_cctx * LZ4F_compressionContext_t
size_t LZ4F_flush(LZ4F_cctx *cctxPtr, void *dstBuffer, size_t dstCapacity, const LZ4F_compressOptions_t *compressOptionsPtr)
static LZ4F_errorCode_t err0r(LZ4F_errorCodes code)
LZ4F_blockSizeID_t blockSizeID
void LZ4_resetStream(LZ4_stream_t *LZ4_stream)
static void LZ4F_writeLE32(void *dst, U32 value32)
static int LZ4F_localSaveDict(LZ4F_cctx_t *cctxPtr)
static U32 LZ4F_readLE32(const void *src)
unsigned __int64 uint64_t
#define LZ4F_GENERATE_STRING(STRING)
static const size_t maxFHSize
static const size_t BHSize
const char * LZ4F_getErrorName(LZ4F_errorCode_t code)
struct LZ4F_cctx_s LZ4F_cctx_t
LZ4F_frameInfo_t frameInfo
int LZ4_compress_HC_continue(LZ4_streamHC_t *LZ4_streamHCPtr, const char *src, char *dst, int srcSize, int dstCapacity)
size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences_t *preferencesPtr)
LZ4LIB_API char int compressedSize
static int LZ4F_localLZ4_compress_limitedOutput_continue(void *ctx, const char *src, char *dst, int srcSize, int dstCapacity, int level)
size_t LZ4F_compressFrame(void *dstBuffer, size_t dstCapacity, const void *srcBuffer, size_t srcSize, const LZ4F_preferences_t *preferencesPtr)
static int LZ4F_localLZ4_compressHC_limitedOutput_continue(void *ctx, const char *src, char *dst, int srcSize, int dstSize, int level)
#define LZ4F_HEADER_SIZE_MAX
static size_t LZ4F_compressBound_internal(size_t srcSize, const LZ4F_preferences_t *preferencesPtr, size_t alreadyBuffered)
static void LZ4F_updateDict(LZ4F_dctx *dctxPtr, const BYTE *dstPtr, size_t dstSize, const BYTE *dstPtr0, unsigned withinTmp)
static const char * LZ4F_errorStrings[]
unsigned long long contentSize
void LZ4F_resetDecompressionContext(LZ4F_dctx *dctx)
LZ4F_blockMode_t blockMode
static size_t LZ4F_compressBlock(void *dst, const void *src, size_t srcSize, compressFunc_t compress, void *lz4ctx, int level)
static size_t LZ4F_getBlockSize(unsigned blockSizeID)
XXH_PUBLIC_API XXH_errorcode XXH32_update(XXH32_state_t *state_in, const void *input, size_t len)
static size_t LZ4F_decodeHeader(LZ4F_dctx *dctxPtr, const void *src, size_t srcSize)
XXH_PUBLIC_API unsigned int XXH32(const void *input, size_t len, unsigned int seed)
int LZ4_compress_HC_extStateHC(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int compressionLevel)
GLenum GLuint GLenum GLsizei length
#define LZ4_STATIC_ASSERT(c)
unsigned LZ4F_getVersion(void)
LZ4F_frameInfo_t frameInfo
int(* compressFunc_t)(void *ctx, const char *src, char *dst, int srcSize, int dstSize, int level)
int LZ4_saveDict(LZ4_stream_t *LZ4_dict, char *safeBuffer, int dictSize)
static void LZ4F_writeLE64(void *dst, U64 value64)
int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
int LZ4_saveDictHC(LZ4_streamHC_t *LZ4_streamHCPtr, char *safeBuffer, int dictSize)