44# define LZ4_HEAPMODE 0
51#define ACCELERATION_DEFAULT 1
70#ifndef LZ4_FORCE_MEMORY_ACCESS
71# if defined(__GNUC__) && \
72 ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) \
73 || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) )
74# define LZ4_FORCE_MEMORY_ACCESS 2
75# elif (defined(__INTEL_COMPILER) && !defined(_WIN32)) || defined(__GNUC__)
76# define LZ4_FORCE_MEMORY_ACCESS 1
84#if defined(_MSC_VER) && defined(_WIN32_WCE)
85# define LZ4_FORCE_SW_BITCOUNT
97#ifndef LZ4_SRC_INCLUDED
98# define LZ4_SRC_INCLUDED 1
101#ifndef LZ4_STATIC_LINKING_ONLY
102#define LZ4_STATIC_LINKING_ONLY
105#ifndef LZ4_DISABLE_DEPRECATE_WARNINGS
106#define LZ4_DISABLE_DEPRECATE_WARNINGS
109#define LZ4_STATIC_LINKING_ONLY
119# pragma warning(disable : 4127)
120# pragma warning(disable : 4293)
123#ifndef LZ4_FORCE_INLINE
125# define LZ4_FORCE_INLINE static __forceinline
127# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
129# define LZ4_FORCE_INLINE static inline __attribute__((always_inline))
131# define LZ4_FORCE_INLINE static inline
134# define LZ4_FORCE_INLINE static
153#if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) && defined(__GNUC__) && !defined(__clang__)
154# define LZ4_FORCE_O2_GCC_PPC64LE __attribute__((optimize("O2")))
155# define LZ4_FORCE_O2_INLINE_GCC_PPC64LE __attribute__((optimize("O2"))) LZ4_FORCE_INLINE
157# define LZ4_FORCE_O2_GCC_PPC64LE
158# define LZ4_FORCE_O2_INLINE_GCC_PPC64LE static
161#if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__)
162# define expect(expr,value) (__builtin_expect ((expr),(value)) )
164# define expect(expr,value) (expr)
168#define likely(expr) expect(int(expr) != 0, 1)
171#define unlikely(expr) expect(int(expr) != 0, 0)
179#define ALLOC(s) malloc(s)
180#define ALLOC_AND_ZERO(s) calloc(1,s)
181#define FREEMEM(p) free(p)
183#define MEM_INIT(p,v,s) memset((p),(v),(s))
191#define WILDCOPYLENGTH 8
192#define LASTLITERALS 5
194#define MATCH_SAFEGUARD_DISTANCE ((2*WILDCOPYLENGTH) - MINMATCH)
195#define FASTLOOP_SAFE_DISTANCE 64
196static const int LZ4_minLength = (
MFLIMIT+1);
202#define LZ4_DISTANCE_ABSOLUTE_MAX 65535
203#if (LZ4_DISTANCE_MAX > LZ4_DISTANCE_ABSOLUTE_MAX)
204# error "LZ4_DISTANCE_MAX is too big : must be <= 65535"
208#define ML_MASK ((1U<<ML_BITS)-1)
209#define RUN_BITS (8-ML_BITS)
210#define RUN_MASK ((1U<<RUN_BITS)-1)
216#if defined(LZ4_DEBUG) && (LZ4_DEBUG>=1)
220# define assert(condition) ((void)0)
224#define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; }
226#if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2)
229# define DEBUGLOG(l, ...) { \
230 if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \
231 fprintf(stderr, __FILE__ ": "); \
232 fprintf(stderr, __VA_ARGS__); \
233 fprintf(stderr, " \n"); \
236# define DEBUGLOG(l, ...) {}
243#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) )
256 typedef unsigned short U16;
259 typedef unsigned long long U64;
263#if defined(__x86_64__)
279static unsigned LZ4_isLittleEndian(
void)
281 const union {
U32 u;
BYTE c[4]; }
one = { 1 };
286#if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==2)
296#elif defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==1)
302static U16 LZ4_read16(
const void* ptr) {
return ((
const unalign*)ptr)->u16; }
303static U32 LZ4_read32(
const void* ptr) {
return ((
const unalign*)ptr)->u32; }
304static reg_t LZ4_read_ARCH(
const void* ptr) {
return ((
const unalign*)ptr)->uArch; }
326static void LZ4_write16(
void*
memPtr,
U16 value)
331static void LZ4_write32(
void*
memPtr,
U32 value)
339static U16 LZ4_readLE16(
const void*
memPtr)
341 if (LZ4_isLittleEndian()) {
342 return LZ4_read16(
memPtr);
345 return (
U16)((
U16)p[0] + (p[1]<<8));
349static void LZ4_writeLE16(
void*
memPtr,
U16 value)
351 if (LZ4_isLittleEndian()) {
352 LZ4_write16(
memPtr, value);
356 p[1] = (
BYTE)(value>>8);
368 do {
memcpy(d,s,8); d+=8; s+=8; }
while (d<e);
371static const unsigned inc32table[8] = {0, 1, 2, 1, 0, 4, 4, 4};
372static const int dec64table[8] = {0, 0, 0, -1, -4, 1, 2, 3};
375#ifndef LZ4_FAST_DEC_LOOP
376# if defined(__i386__) || defined(__x86_64__)
377# define LZ4_FAST_DEC_LOOP 1
378# elif defined(__aarch64__) && !defined(__clang__)
382# define LZ4_FAST_DEC_LOOP 1
384# define LZ4_FAST_DEC_LOOP 0
398 srcPtr += inc32table[offset];
400 srcPtr -= dec64table[offset];
421 do {
memcpy(d,s,16);
memcpy(d+16,s+16,16); d+=32; s+=32; }
while (d<e);
466static unsigned LZ4_NbCommonBytes (
reg_t val)
468 if (LZ4_isLittleEndian()) {
469 if (
sizeof(val)==8) {
470# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT)
474# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT)
478 0, 3, 1, 3, 1, 4, 2, 7,
479 0, 2, 3, 6, 1, 5, 3, 5,
480 1, 3, 4, 4, 2, 5, 6, 7,
481 7, 0, 1, 2, 3, 3, 4, 6,
482 2, 6, 5, 5, 3, 4, 5, 6,
483 7, 1, 2, 4, 6, 4, 4, 5,
484 7, 2, 6, 5, 7, 6, 7, 7 };
485 return DeBruijnBytePos[((
U64)((val & -(
long long)val) * 0x0218A392CDABBD3FULL)) >> 58];
488# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT)
492# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT)
496 3, 2, 2, 1, 3, 2, 0, 1,
497 3, 3, 1, 2, 2, 2, 2, 0,
498 3, 1, 2, 0, 1, 0, 1, 1 };
503 if (
sizeof(val)==8) {
504# if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT)
507 return (
unsigned)(r>>3);
508# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT)
511 static const U32 by32 =
sizeof(val)*4;
515 if (!(val>>
by32)) { r=4; }
else { r=0; val>>=
by32; }
516 if (!(val>>16)) { r+=2; val>>=8; }
else { val>>=24; }
521# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT)
524 return (
unsigned)(r>>3);
525# elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT)
529 if (!(val>>16)) { r=2; val>>=8; }
else { r=0; val>>=24; }
537#define STEPSIZE sizeof(reg_t)
548 return LZ4_NbCommonBytes(
diff);
554 pIn += LZ4_NbCommonBytes(
diff);
565#ifndef LZ4_COMMONDEFS_ONLY
569static const int LZ4_64Klimit = ((64
KB) + (
MFLIMIT-1));
570static const U32 LZ4_skipTrigger = 6;
619#if defined (__cplusplus)
629 const void* dictStart,
size_t dictSize);
633#if defined (__cplusplus)
644 if (tableType ==
byU16)
653 if (LZ4_isLittleEndian()) {
664 if ((
sizeof(
reg_t)==8) && (tableType !=
byU16))
return LZ4_hash5(LZ4_read_ARCH(p), tableType);
665 return LZ4_hash4(LZ4_read32(p), tableType);
720 if (tableType ==
byU32) {
725 if (tableType ==
byU16) {
735 if (tableType ==
byPtr) {
const BYTE*
const* hashTable = (
const BYTE*
const*)
tableBase;
return hashTable[h]; }
757 DEBUGLOG(5,
"LZ4_prepareTable: Full reset for %p",
cctx);
768 if (
cctx->tableType != tableType
770 || ((tableType ==
byU32) &&
cctx->currentOffset > 1
GB)
771 || tableType ==
byPtr
774 DEBUGLOG(4,
"LZ4_prepareTable: Resetting table in %p",
cctx);
776 cctx->currentOffset = 0;
779 DEBUGLOG(4,
"LZ4_prepareTable: Re-use hash table (no reset)");
787 if (
cctx->currentOffset != 0 && tableType ==
byU32) {
788 DEBUGLOG(5,
"LZ4_prepareTable: adding 64KB to currentOffset");
789 cctx->currentOffset += 64
KB;
818 const BYTE* lowLimit;
821 const BYTE*
const dictionary =
847 DEBUGLOG(5,
"LZ4_compress_generic: srcSize=%i, tableType=%u",
inputSize, tableType);
852 if ((tableType ==
byU16) && (
inputSize>=LZ4_64Klimit)) {
return 0; }
868 cctx->tableType = (
U16)tableType;
883 if (tableType ==
byPtr) {
896 match = LZ4_getPositionOnHash(h,
cctx->hashTable, tableType, base);
901 || (LZ4_read32(
match) != LZ4_read32(
ip)) );
928 lowLimit = dictionary;
938 lowLimit = dictionary;
958 if (LZ4_read32(
match) == LZ4_read32(
ip)) {
985 for(; len >= 255 ; len-=255) *
op++ = 255;
993 DEBUGLOG(6,
"seq.start:%i, literals=%u, match.start:%i",
1017 LZ4_writeLE16(
op, (
U16)offset);
op+=2;
1028 && (lowLimit==dictionary) ) {
1075 LZ4_write32(
op, 0xFFFFFFFF);
1078 LZ4_write32(
op, 0xFFFFFFFF);
1098 if (tableType ==
byPtr) {
1103 && (LZ4_read32(
match) == LZ4_read32(
ip)) )
1109 U32 const current = (
U32)(
ip-base);
1117 lowLimit = dictionary;
1126 lowLimit = dictionary;
1138 && (LZ4_read32(
match) == LZ4_read32(
ip)) ) {
1142 DEBUGLOG(6,
"seq.start:%i, literals=%u, match.start:%i",
1185 result = (int)(((
char*)
op) -
dest);
1198 return LZ4_compress_generic(ctx,
source,
dest,
inputSize,
NULL, 0,
notLimited,
byU16,
noDict,
noDictIssue,
acceleration);
1201 return LZ4_compress_generic(ctx,
source,
dest,
inputSize,
NULL, 0,
notLimited, tableType,
noDict,
noDictIssue,
acceleration);
1205 return LZ4_compress_generic(ctx,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput,
byU16,
noDict,
noDictIssue,
acceleration);
1208 return LZ4_compress_generic(ctx,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput, tableType,
noDict,
noDictIssue,
acceleration);
1232 return LZ4_compress_generic(ctx, src,
dst,
srcSize,
NULL, 0,
notLimited, tableType,
noDict,
dictSmall,
acceleration);
1234 return LZ4_compress_generic(ctx, src,
dst,
srcSize,
NULL, 0,
notLimited, tableType,
noDict,
noDictIssue,
acceleration);
1239 return LZ4_compress_generic(ctx, src,
dst,
srcSize,
NULL, 0,
notLimited, tableType,
noDict,
noDictIssue,
acceleration);
1246 return LZ4_compress_generic(ctx, src,
dst,
srcSize,
NULL,
dstCapacity,
limitedOutput, tableType,
noDict,
dictSmall,
acceleration);
1248 return LZ4_compress_generic(ctx, src,
dst,
srcSize,
NULL,
dstCapacity,
limitedOutput, tableType,
noDict,
noDictIssue,
acceleration);
1253 return LZ4_compress_generic(ctx, src,
dst,
srcSize,
NULL,
dstCapacity,
limitedOutput, tableType,
noDict,
noDictIssue,
acceleration);
1292 return LZ4_compress_generic(&ctx.
internal_donotuse, src,
dst,
srcSize,
NULL,
dstCapacity,
limitedOutput,
byU16,
noDict,
noDictIssue,
acceleration);
1295 return LZ4_compress_generic(&ctx.
internal_donotuse, src,
dst,
srcSize,
NULL,
dstCapacity,
limitedOutput,
addrMode,
noDict,
noDictIssue,
acceleration);
1312 return LZ4_compress_generic(&state->
internal_donotuse, src,
dst, *
srcSizePtr,
srcSizePtr,
targetDstSize,
fillOutput,
byU16,
noDict,
noDictIssue, 1);
1315 return LZ4_compress_generic(&state->
internal_donotuse, src,
dst, *
srcSizePtr,
srcSizePtr,
targetDstSize,
fillOutput,
addrMode,
noDict,
noDictIssue, 1);
1324 if (ctx ==
NULL)
return 0;
1357static size_t LZ4_stream_t_alignment(
void)
1360 return sizeof(
t_a) -
sizeof(
t_a.t);
1367 if (buffer ==
NULL) {
return NULL; }
1372 if (((
size_t)buffer) & (LZ4_stream_t_alignment() - 1)) {
return NULL; }
1399#define HASH_UNIT sizeof(reg_t)
1404 const BYTE* p = (
const BYTE*)dictionary;
1408 DEBUGLOG(4,
"LZ4_loadDict (%i bytes from %p into %p)", dictSize, dictionary,
LZ4_dict);
1422 dict->currentOffset += 64
KB;
1430 dict->dictionary = p;
1432 dict->tableType = tableType;
1439 return (
int)
dict->dictSize;
1446 DEBUGLOG(4,
"LZ4_attach_dictionary (%p, %p, size %u)",
1456 if (dictCtx !=
NULL) {
1533 return LZ4_compress_generic(
streamPtr,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput, tableType,
withPrefix64k,
dictSmall,
acceleration);
1535 return LZ4_compress_generic(
streamPtr,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput, tableType,
withPrefix64k,
noDictIssue,
acceleration);
1553 result =
LZ4_compress_generic(
streamPtr,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput, tableType,
usingExtDict,
noDictIssue,
acceleration);
1555 result =
LZ4_compress_generic(
streamPtr,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput, tableType,
usingDictCtx,
noDictIssue,
acceleration);
1559 result =
LZ4_compress_generic(
streamPtr,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput, tableType,
usingExtDict,
dictSmall,
acceleration);
1561 result =
LZ4_compress_generic(
streamPtr,
source,
dest,
inputSize,
NULL,
maxOutputSize,
limitedOutput, tableType,
usingExtDict,
noDictIssue,
acceleration);
1580 result =
LZ4_compress_generic(
streamPtr,
source,
dest,
srcSize,
NULL, 0,
notLimited,
byU32,
usingExtDict,
dictSmall, 1);
1582 result =
LZ4_compress_generic(
streamPtr,
source,
dest,
srcSize,
NULL, 0,
notLimited,
byU32,
usingExtDict,
noDictIssue, 1);
1604 if ((
U32)dictSize > 64
KB) { dictSize = 64
KB; }
1605 if ((
U32)dictSize >
dict->dictSize) { dictSize = (int)
dict->dictSize; }
1610 dict->dictSize = (
U32)dictSize;
1625#define MIN(a,b) ( (a) < (b) ? (a) : (b) )
1641 unsigned length = 0;
1668 const char*
const src,
1677 const BYTE*
const dictStart,
1678 const size_t dictSize
1681 if (src ==
NULL) {
return -1; }
1713 return ((
srcSize==1) && (*
ip==0)) ? 0 : -1;
1719#if LZ4_FAST_DEC_LOOP
1721 DEBUGLOG(6,
"skip fast decode loop");
1760 DEBUGLOG(7,
"copy %u bytes in a 16-bytes stripe", (
unsigned)length);
1775 offset = LZ4_readLE16(
ip);
ip+=2;
1821 length =
MIN(length, (
size_t)(
oend-
op));
1883 op += length;
ip += length;
1888 offset = LZ4_readLE16(
ip);
ip += 2;
1923#if LZ4_FAST_DEC_LOOP
1980 offset = LZ4_readLE16(
ip);
ip+=2;
1999#if LZ4_FAST_DEC_LOOP
2038 size_t const mlen =
MIN(length, (
size_t)(
oend-
op));
2047 if (
op ==
oend) {
break; }
2057 match += inc32table[offset];
2059 match -= dec64table[offset];
2084 return (
int) (((
char*)
op)-
dst);
2086 return (
int) (((
const char*)
ip)-src);
2091 return (
int) (-(((
const char*)
ip)-src))-1;
2153 const void* dictStart,
size_t dictSize)
2162 const void* dictStart,
size_t dictSize)
2175 size_t prefixSize,
const void* dictStart,
size_t dictSize)
2179 (
BYTE*)
dest-prefixSize, (
const BYTE*)dictStart, dictSize);
2184 size_t prefixSize,
const void* dictStart,
size_t dictSize)
2188 (
BYTE*)
dest-prefixSize, (
const BYTE*)dictStart, dictSize);
2217 lz4sd->prefixEnd = (
const BYTE*) dictionary + dictSize;
2219 lz4sd->extDictSize = 0;
2255 if (
lz4sd->prefixSize == 0) {
2259 if (result <= 0)
return result;
2264 if (
lz4sd->prefixSize >= 64
KB - 1)
2266 else if (
lz4sd->extDictSize == 0)
2272 if (result <= 0)
return result;
2274 lz4sd->prefixEnd += result;
2281 if (result <= 0)
return result;
2296 if (
lz4sd->prefixSize == 0) {
2299 if (result <= 0)
return result;
2303 if (
lz4sd->prefixSize >= 64
KB - 1 ||
lz4sd->extDictSize == 0)
2308 if (result <= 0)
return result;
2316 if (result <= 0)
return result;
2336 if (dictStart+dictSize ==
dest) {
2337 if (dictSize >= 64
KB - 1) {
2349 if (dictSize==0 || dictStart+dictSize ==
dest)
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define NULL
Definition oodle2base.h:134
RAD_U32 U32
Definition egttypes.h:501
RAD_U64 U64
Definition egttypes.h:511
RAD_S32 S32
Definition egttypes.h:496
RAD_U16 U16
Definition egttypes.h:491
#define LZ4_HASHTABLESIZE
Definition lz4.h:641
#define LZ4_COMPRESSBOUND(isize)
Definition lz4.h:198
#define LZ4_MEMORY_USAGE
Definition lz4.h:147
#define LZ4_VERSION_STRING
Definition lz4.h:126
#define LZ4_HASH_SIZE_U32
Definition lz4.h:642
#define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize)
Definition lz4.h:430
#define LZ4_MAX_INPUT_SIZE
Definition lz4.h:197
#define LZ4_VERSION_NUMBER
Definition lz4.h:121
#define LZ4_HASHLOG
Definition lz4.h:640
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
float swift_float2 __attribute__((__ext_vector_type__(2)))
Definition MarketplaceKitWrapper.h:67
const char * source
Definition lz4.h:711
char int srcSize
Definition lz4.h:709
char int compressedSize
Definition lz4.h:735
#define LZ4_STREAMSIZE
Definition lz4.h:636
char * inputBuffer
Definition lz4.h:731
const char char int inputSize
Definition lz4.h:711
char * dst
Definition lz4.h:735
#define LZ4_STREAMDECODESIZE
Definition lz4.h:667
char int int maxOutputSize
Definition lz4.h:710
#define LZ4_BEGIN_NAMESPACE
Definition lz4.h:47
char int originalSize
Definition lz4.h:736
#define LZ4_END_NAMESPACE
Definition lz4.h:48
char int outputSize
Definition lz4.h:717
char int isize
Definition lz4.h:718
char * dest
Definition lz4.h:709
memcpy(InputBufferBase, BinkBlocksData, BinkBlocksSize)
int LZ4_decompress_safe_forceExtDict(const char *source, char *dest, int compressedSize, int maxOutputSize, const void *dictStart, size_t dictSize)
Definition lz4.c.inl:2151
LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_partial(const char *src, char *dst, int compressedSize, int targetOutputSize, int dstCapacity)
Definition lz4.c.inl:2107
LZ4_FORCE_O2_INLINE_GCC_PPC64LE void LZ4_wildCopy8(void *dstPtr, const void *srcPtr, void *dstEnd)
Definition lz4.c.inl:362
#define STEPSIZE
Definition lz4.c.inl:537
#define KB
Definition lz4.c.inl:198
int LZ4_compress_fast_extState(void *state, const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
Definition lz4.c.inl:1191
int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize)
Definition lz4.c.inl:2347
int LZ4_sizeofStreamState()
Definition lz4.c.inl:2402
#define LZ4_STATIC_ASSERT(c)
Definition lz4.c.inl:224
endCondition_directive
Definition lz4.c.inl:1621
@ endOnInputSize
Definition lz4.c.inl:1621
@ endOnOutputSize
Definition lz4.c.inl:1621
unsigned long long U64
Definition lz4.c.inl:259
earlyEnd_directive
Definition lz4.c.inl:1622
@ partial_decode
Definition lz4.c.inl:1622
@ decode_full_block
Definition lz4.c.inl:1622
size_t reg_t
Definition lz4.c.inl:266
#define ACCELERATION_DEFAULT
Definition lz4.c.inl:51
int LZ4_compressBound(int isize)
Definition lz4.c.inl:610
int LZ4_loadDict(LZ4_stream_t *LZ4_dict, const char *dictionary, int dictSize)
Definition lz4.c.inl:1400
#define MINMATCH
Definition lz4.c.inl:189
LZ4_FORCE_INLINE int LZ4_decompress_fast_doubleDict(const char *source, char *dest, int originalSize, size_t prefixSize, const void *dictStart, size_t dictSize)
Definition lz4.c.inl:2183
int LZ4_decompress_safe_usingDict(const char *source, char *dest, int compressedSize, int maxOutputSize, const char *dictStart, int dictSize)
Definition lz4.c.inl:2332
#define MIN(a, b)
Definition lz4.c.inl:1625
#define GB
Definition lz4.c.inl:200
int LZ4_compress_limitedOutput(const char *source, char *dest, int inputSize, int maxOutputSize)
Definition lz4.c.inl:2360
int LZ4_decoderRingBufferSize(int maxBlockSize)
Definition lz4.c.inl:2234
int LZ4_compress_default(const char *src, char *dst, int srcSize, int maxOutputSize)
Definition lz4.c.inl:1278
int LZ4_compress_limitedOutput_continue(LZ4_stream_t *LZ4_stream, const char *src, char *dst, int srcSize, int dstCapacity)
Definition lz4.c.inl:2376
unsigned char BYTE
Definition lz4.c.inl:255
LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest, int compressedSize, int maxOutputSize)
Definition lz4.c.inl:2126
int LZ4_compress_destSize(const char *src, char *dst, int *srcSizePtr, int targetDstSize)
Definition lz4.c.inl:1320
#define LZ4_FORCE_O2_GCC_PPC64LE
Definition lz4.c.inl:157
LZ4_FORCE_INLINE unsigned read_variable_length(const BYTE **ip, const BYTE *lencheck, int loop_check, int initial_check, variable_length_error *error)
Definition lz4.c.inl:1639
signed int S32
Definition lz4.c.inl:258
#define LZ4_FORCE_O2_INLINE_GCC_PPC64LE
Definition lz4.c.inl:158
LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe(const char *source, char *dest, int compressedSize, int maxDecompressedSize)
Definition lz4.c.inl:2099
int LZ4_compress(const char *src, char *dest, int srcSize)
Definition lz4.c.inl:2364
void LZ4_resetStream(LZ4_stream_t *LZ4_stream)
Definition lz4.c.inl:1380
#define LZ4_DISTANCE_ABSOLUTE_MAX
Definition lz4.c.inl:202
void LZ4_resetStream_fast(LZ4_stream_t *ctx)
Definition lz4.c.inl:1386
int LZ4_freeStream(LZ4_stream_t *LZ4_stream)
Definition lz4.c.inl:1390
#define MFLIMIT
Definition lz4.c.inl:193
const char * LZ4_versionString(void)
Definition lz4.c.inl:609
LZ4_FORCE_INLINE void LZ4_putPosition(const BYTE *p, void *tableBase, tableType_t tableType, const BYTE *srcBase)
Definition lz4.c.inl:705
int LZ4_compress_fast(const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
Definition lz4.c.inl:1259
int LZ4_uncompress(const char *source, char *dest, int outputSize)
Definition lz4.c.inl:2391
char * LZ4_slideInputBuffer(void *state)
Definition lz4.c.inl:2417
int LZ4_compress_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize)
Definition lz4.c.inl:2380
LZ4_stream_t * LZ4_initStream(void *buffer, size_t size)
Definition lz4.c.inl:1364
#define LASTLITERALS
Definition lz4.c.inl:192
int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize)
Definition lz4.c.inl:2395
#define DEBUGLOG(l,...)
Definition lz4.c.inl:236
LZ4_END_NAMESPACE LZ4_BEGIN_NAMESPACE int LZ4_compress_forceExtDict(LZ4_stream_t *LZ4_dict, const char *source, char *dest, int srcSize)
Definition lz4.c.inl:1572
LZ4_FORCE_INLINE void LZ4_prepareTable(LZ4_stream_t_internal *const cctx, const int inputSize, const tableType_t tableType)
Definition lz4.c.inl:750
LZ4_FORCE_INLINE int LZ4_decompress_safe_doubleDict(const char *source, char *dest, int compressedSize, int maxOutputSize, size_t prefixSize, const void *dictStart, size_t dictSize)
Definition lz4.c.inl:2174
LZ4_FORCE_INLINE unsigned LZ4_count(const BYTE *pIn, const BYTE *pMatch, const BYTE *pInLimit)
Definition lz4.c.inl:539
int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
Definition lz4.c.inl:2213
#define ALLOC(s)
Definition lz4.c.inl:179
#define FREEMEM(p)
Definition lz4.c.inl:181
int LZ4_versionNumber(void)
Definition lz4.c.inl:608
variable_length_error
Definition lz4.c.inl:1636
@ length_ok
Definition lz4.c.inl:1636
@ loop_error
Definition lz4.c.inl:1636
@ initial_error
Definition lz4.c.inl:1636
dictIssue_directive
Definition lz4.c.inl:602
@ noDictIssue
Definition lz4.c.inl:602
@ dictSmall
Definition lz4.c.inl:602
LZ4_stream_t * LZ4_createStream(void)
Definition lz4.c.inl:1344
int LZ4_compress_withState(void *state, const char *src, char *dst, int srcSize)
Definition lz4.c.inl:2372
#define likely(expr)
Definition lz4.c.inl:168
LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int compressedSize, int maxOutputSize)
Definition lz4.c.inl:2250
int LZ4_compress_fast_force(const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
Definition lz4.c.inl:1286
#define FASTLOOP_SAFE_DISTANCE
Definition lz4.c.inl:195
int LZ4_sizeofState()
Definition lz4.c.inl:611
#define ML_BITS
Definition lz4.c.inl:207
#define ML_MASK
Definition lz4.c.inl:208
#define ALLOC_AND_ZERO(s)
Definition lz4.c.inl:180
#define MEM_INIT(p, v, s)
Definition lz4.c.inl:183
LZ4_FORCE_INLINE const BYTE * LZ4_getPosition(const BYTE *p, const void *tableBase, tableType_t tableType, const BYTE *srcBase)
Definition lz4.c.inl:741
#define HASH_UNIT
Definition lz4.c.inl:1399
dict_directive
Definition lz4.c.inl:601
@ noDict
Definition lz4.c.inl:601
@ withPrefix64k
Definition lz4.c.inl:601
@ usingExtDict
Definition lz4.c.inl:601
@ usingDictCtx
Definition lz4.c.inl:601
LZ4_FORCE_INLINE int LZ4_compress_generic(LZ4_stream_t_internal *const cctx, const char *const source, char *const dest, const int inputSize, int *inputConsumed, const int maxOutputSize, const limitedOutput_directive outputDirective, const tableType_t tableType, const dict_directive dictDirective, const dictIssue_directive dictIssue, const int acceleration)
Definition lz4.c.inl:800
size_t uptrval
Definition lz4.c.inl:260
limitedOutput_directive
Definition lz4.c.inl:269
@ limitedOutput
Definition lz4.c.inl:271
@ fillOutput
Definition lz4.c.inl:272
@ notLimited
Definition lz4.c.inl:270
int LZ4_compress_limitedOutput_withState(void *state, const char *src, char *dst, int srcSize, int dstSize)
Definition lz4.c.inl:2368
int LZ4_saveDict(LZ4_stream_t *LZ4_dict, char *safeBuffer, int dictSize)
Definition lz4.c.inl:1599
#define LZ4_FORCE_INLINE
Definition lz4.c.inl:134
int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration)
Definition lz4.c.inl:1496
LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void *const p, tableType_t const tableType)
Definition lz4.c.inl:662
unsigned int U32
Definition lz4.c.inl:257
LZ4_FORCE_INLINE int LZ4_decompress_generic(const char *const src, char *const dst, int srcSize, int outputSize, endCondition_directive endOnInput, earlyEnd_directive partialDecoding, dict_directive dict, const BYTE *const lowPrefix, const BYTE *const dictStart, const size_t dictSize)
Definition lz4.c.inl:1667
int LZ4_resetStreamState(void *state, char *inputBuffer)
Definition lz4.c.inl:2404
#define MATCH_SAFEGUARD_DISTANCE
Definition lz4.c.inl:194
#define assert(condition)
Definition lz4.c.inl:220
#define unlikely(expr)
Definition lz4.c.inl:171
int LZ4_compress_fast_extState_fastReset(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
Definition lz4.c.inl:1222
LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int originalSize)
Definition lz4.c.inl:2290
#define WILDCOPYLENGTH
Definition lz4.c.inl:191
unsigned short U16
Definition lz4.c.inl:256
void LZ4_attach_dictionary(LZ4_stream_t *workingStream, const LZ4_stream_t *dictionaryStream)
Definition lz4.c.inl:1442
tableType_t
Definition lz4.c.inl:576
@ clearedTable
Definition lz4.c.inl:576
@ byU16
Definition lz4.c.inl:576
@ byPtr
Definition lz4.c.inl:576
@ byU32
Definition lz4.c.inl:576
#define RUN_MASK
Definition lz4.c.inl:210
int LZ4_decompress_fast_withPrefix64k(const char *source, char *dest, int originalSize)
Definition lz4.c.inl:2134
LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
Definition lz4.c.inl:2116
int LZ4_freeStreamDecode(LZ4_streamDecode_t *LZ4_stream)
Definition lz4.c.inl:2200
LZ4_streamDecode_t * LZ4_createStreamDecode(void)
Definition lz4.c.inl:2193
void * LZ4_create(char *inputBuffer)
Definition lz4.c.inl:2411
LZ4_FORCE_INLINE void LZ4_putPositionOnHash(const BYTE *p, U32 h, void *tableBase, tableType_t const tableType, const BYTE *srcBase)
Definition lz4.cpp:804
earlyEnd_directive
Definition lz4.cpp:1765
size_t reg_t
Definition lz4.cpp:316
unsigned char BYTE
Definition lz4.cpp:305
LZ4_FORCE_INLINE U32 LZ4_hash4(U32 sequence, tableType_t const tableType)
Definition lz4.cpp:753
LZ4_FORCE_INLINE U32 LZ4_getIndexOnHash(U32 h, const void *tableBase, tableType_t tableType)
Definition lz4.cpp:829
dictIssue_directive
Definition lz4.cpp:719
LZ4_FORCE_INLINE void LZ4_putIndexOnHash(U32 idx, U32 h, void *tableBase, tableType_t const tableType)
Definition lz4.cpp:792
LZ4_FORCE_INLINE void LZ4_clearHash(U32 h, void *tableBase, tableType_t const tableType)
Definition lz4.cpp:780
dict_directive
Definition lz4.cpp:718
limitedOutput_directive
Definition lz4.cpp:319
LZ4_FORCE_INLINE U32 LZ4_hash5(U64 sequence, tableType_t const tableType)
Definition lz4.cpp:761
tableType_t
Definition lz4.cpp:693
SIZE_T uptrval
Definition lz4.cpp:310
float v
Definition radaudio_mdct.cpp:62
SIZE_T prefixSize
Definition lz4.h:706
LZ4_u32 currentOffset
Definition lz4.h:667
const LZ4_byte * dictionary
Definition lz4.h:665
const LZ4_stream_t_internal * dictCtx
Definition lz4.h:666
LZ4_u32 dictSize
Definition lz4.h:669
LZ4_u32 hashTable[LZ4_HASH_SIZE_U32]
Definition lz4.h:664
LZ4_stream_t_internal internal_donotuse
Definition lz4.h:676