35 #if defined (__cplusplus) 39 #ifndef LZ4_H_2983827168210 40 #define LZ4_H_2983827168210 78 #ifndef LZ4LIB_VISIBILITY 79 # if defined(__GNUC__) && (__GNUC__ >= 4) 80 # define LZ4LIB_VISIBILITY __attribute__ ((visibility ("default"))) 82 # define LZ4LIB_VISIBILITY 85 #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) 86 # define LZ4LIB_API __declspec(dllexport) LZ4LIB_VISIBILITY 87 #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) 88 # define LZ4LIB_API __declspec(dllimport) LZ4LIB_VISIBILITY 90 # define LZ4LIB_API LZ4LIB_VISIBILITY 94 #define LZ4_VERSION_MAJOR 1 95 #define LZ4_VERSION_MINOR 8 96 #define LZ4_VERSION_RELEASE 2 98 #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) 100 #define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE 101 #define LZ4_QUOTE(str) #str 102 #define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str) 103 #define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) 119 #ifndef LZ4_MEMORY_USAGE 120 # define LZ4_MEMORY_USAGE 14 155 #define LZ4_MAX_INPUT_SIZE 0x7E000000 156 #define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) 326 #define LZ4_DECODER_RING_BUFFER_SIZE(mbs) (65536 + 14 + (mbs)) 380 #ifdef LZ4_STATIC_LINKING_ONLY 465 #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) 466 #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) 467 #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) 469 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) 484 const uint8_t* externalDict;
486 const uint8_t* prefixEnd;
520 #define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4) 521 #define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long)) 536 #define LZ4_STREAMDECODESIZE_U64 4 537 #define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long)) 554 #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS 555 # define LZ4_DEPRECATED(message) 557 # define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) 558 # if defined (__cplusplus) && (__cplusplus >= 201402) 559 # define LZ4_DEPRECATED(message) [[deprecated(message)]] 560 # elif (LZ4_GCC_VERSION >= 405) || defined(__clang__) 561 # define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) 562 # elif (LZ4_GCC_VERSION >= 301) 563 # define LZ4_DEPRECATED(message) __attribute__((deprecated)) 564 # elif defined(_MSC_VER) 565 # define LZ4_DEPRECATED(message) __declspec(deprecated(message)) 567 # pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler") 568 # define LZ4_DEPRECATED(message) 605 #if defined (__cplusplus)
void * LZ4_create(char *inputBuffer)
LZ4_streamDecode_t_internal internal_donotuse
int LZ4_compress_limitedOutput(const char *source, char *dest, int inputSize, int maxOutputSize)
LZ4LIB_API int LZ4_compress_default(const char *src, char *dst, int srcSize, int dstCapacity)
LZ4LIB_API int LZ4_decompress_safe_usingDict(const char *src, char *dst, int srcSize, int dstCapcity, const char *dictStart, int dictSize)
LZ4LIB_API int LZ4_compress_fast_extState(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
#define LZ4_HASH_SIZE_U32
unsigned int currentOffset
LZ4LIB_API int LZ4_sizeofState(void)
LZ4LIB_API void LZ4_resetStream(LZ4_stream_t *streamPtr)
int LZ4_resetStreamState(void *state, char *inputBuffer)
int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize)
#define LZ4_STREAMSIZE_U64
int LZ4_compress_limitedOutput_continue(LZ4_stream_t *LZ4_stream, const char *src, char *dst, int srcSize, int dstCapacity)
char * LZ4_slideInputBuffer(void *state)
#define LZ4_STREAMDECODESIZE_U64
const unsigned char * prefixEnd
int LZ4_uncompress(const char *source, char *dest, int outputSize)
int LZ4_decompress_fast_withPrefix64k(const char *source, char *dest, int originalSize)
const unsigned char * externalDict
unsigned int hashTable[LZ4_HASH_SIZE_U32]
char int int maxOutputSize
int LZ4_compress_withState(void *state, const char *src, char *dst, int srcSize)
void LZ4_attach_dictionary(LZ4_stream_t *working_stream, const LZ4_stream_t *dictionary_stream)
LZ4LIB_API int LZ4_saveDict(LZ4_stream_t *streamPtr, char *safeBuffer, int maxDictSize)
LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest, int compressedSize, int maxOutputSize)
LZ4LIB_API int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int LZ4_decompress_fast(const char *src, char *dst, int originalSize)
#define LZ4_DEPRECATED(message)
LZ4LIB_API int LZ4_freeStream(LZ4_stream_t *streamPtr)
LZ4LIB_API LZ4_stream_t * LZ4_createStream(void)
LZ4LIB_API const char * LZ4_versionString(void)
LZ4_stream_t_internal internal_donotuse
int LZ4_compress_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize)
LZ4LIB_API int LZ4_decompress_safe(const char *src, char *dst, int compressedSize, int dstCapacity)
LZ4LIB_API int LZ4_versionNumber(void)
int LZ4_compress_limitedOutput_withState(void *state, const char *src, char *dst, int srcSize, int dstSize)
LZ4LIB_API int LZ4_compress_destSize(const char *src, char *dst, int *srcSizePtr, int targetDstSize)
const LZ4_stream_t_internal * dictCtx
LZ4LIB_API int LZ4_compress_fast(const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
const char char int inputSize
LZ4LIB_API int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int originalSize)
int LZ4_sizeofStreamState()
LZ4LIB_API LZ4_streamDecode_t * LZ4_createStreamDecode(void)
int LZ4_compress(const char *source, char *dest, int inputSize)
LZ4LIB_API int LZ4_loadDict(LZ4_stream_t *streamPtr, const char *dictionary, int dictSize)
LZ4LIB_API int LZ4_decompress_safe_partial(const char *src, char *dst, int srcSize, int targetOutputSize, int dstCapacity)
const unsigned char * dictionary
LZ4LIB_API int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
void LZ4_resetStream_fast(LZ4_stream_t *ctx)
int LZ4_compress_fast_extState_fastReset(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize)
LZ4LIB_API int LZ4_freeStreamDecode(LZ4_streamDecode_t *LZ4_stream)
LZ4LIB_API int LZ4_decompress_fast_usingDict(const char *src, char *dst, int originalSize, const char *dictStart, int dictSize)
LZ4LIB_API int LZ4_compressBound(int inputSize)
LZ4LIB_API int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int srcSize, int dstCapacity)