35 #if defined (__cplusplus) 39 #ifndef LZ4_H_2983827168210 40 #define LZ4_H_2983827168210 85 #ifndef LZ4LIB_VISIBILITY 86 # if defined(__GNUC__) && (__GNUC__ >= 4) 87 # define LZ4LIB_VISIBILITY __attribute__ ((visibility ("default"))) 89 # define LZ4LIB_VISIBILITY 92 #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) 93 # define LZ4LIB_API __declspec(dllexport) LZ4LIB_VISIBILITY 94 #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) 95 # define LZ4LIB_API __declspec(dllimport) LZ4LIB_VISIBILITY 97 # define LZ4LIB_API LZ4LIB_VISIBILITY 101 #define LZ4_VERSION_MAJOR 1 102 #define LZ4_VERSION_MINOR 9 103 #define LZ4_VERSION_RELEASE 2 105 #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) 107 #define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE 108 #define LZ4_QUOTE(str) #str 109 #define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str) 110 #define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) 126 #ifndef LZ4_MEMORY_USAGE 127 # define LZ4_MEMORY_USAGE 14 170 #define LZ4_MAX_INPUT_SIZE 0x7E000000 171 #define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) 360 #define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize) (65536 + 14 + (maxBlockSize)) 427 #ifdef LZ4_STATIC_LINKING_ONLY 429 #ifndef LZ4_STATIC_3504398509 430 #define LZ4_STATIC_3504398509 432 #ifdef LZ4_PUBLISH_STATIC_FUNCTIONS 433 #define LZ4LIB_STATIC_API LZ4LIB_API 435 #define LZ4LIB_STATIC_API 449 LZ4LIB_STATIC_API
int LZ4_compress_fast_extState_fastReset (
void* state,
const char* src,
char*
dst,
int srcSize,
int dstCapacity,
int acceleration);
531 #define LZ4_DECOMPRESS_INPLACE_MARGIN(compressedSize) (((compressedSize) >> 8) + 32) 532 #define LZ4_DECOMPRESS_INPLACE_BUFFER_SIZE(decompressedSize) ((decompressedSize) + LZ4_DECOMPRESS_INPLACE_MARGIN(decompressedSize)) 534 #ifndef LZ4_DISTANCE_MAX 535 # define LZ4_DISTANCE_MAX 65535 538 #define LZ4_COMPRESS_INPLACE_MARGIN (LZ4_DISTANCE_MAX + 32) 539 #define LZ4_COMPRESS_INPLACE_BUFFER_SIZE(maxCompressedSize) ((maxCompressedSize) + LZ4_COMPRESS_INPLACE_MARGIN) 546 #ifndef LZ4_H_98237428734687 547 #define LZ4_H_98237428734687 556 #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) 557 #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) 558 #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) 560 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) ) 612 #define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4 + ((sizeof(void*)==16) ? 4 : 0) ) 613 #define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long)) 643 #define LZ4_STREAMDECODESIZE_U64 (4 + ((sizeof(void*)==16) ? 2 : 0) ) 644 #define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long)) 667 #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS 668 # define LZ4_DEPRECATED(message) 670 # define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) 671 # if defined (__cplusplus) && (__cplusplus >= 201402) 672 # define LZ4_DEPRECATED(message) [[deprecated(message)]] 673 # elif (LZ4_GCC_VERSION >= 405) || defined(__clang__) 674 # define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) 675 # elif (LZ4_GCC_VERSION >= 301) 676 # define LZ4_DEPRECATED(message) __attribute__((deprecated)) 677 # elif defined(_MSC_VER) 678 # define LZ4_DEPRECATED(message) __declspec(deprecated(message)) 680 # pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler") 681 # define LZ4_DEPRECATED(message) 762 #if defined (__cplusplus) #define LZ4_HASH_SIZE_U32
LZ4LIB_API int LZ4_compress_fast(const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int LZ4_decompress_fast_usingDict(const char *src, char *dst, int originalSize, const char *dictStart, int dictSize)
const unsigned char * prefixEnd
LZ4LIB_API int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
LZ4LIB_API int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int srcSize, int dstCapacity)
#define LZ4_DEPRECATED(message)
const unsigned char * dictionary
LZ4LIB_API int LZ4_decompress_fast(const char *src, char *dst, int originalSize)
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_continue(LZ4_stream_t *streamPtr, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
unsigned int hashTable[LZ4_HASH_SIZE_U32]
const char char int inputSize
const LZ4_stream_t_internal * dictCtx
LZ4LIB_API int LZ4_decompress_safe_partial(const char *src, char *dst, int srcSize, int targetOutputSize, int dstCapacity)
LZ4LIB_API const char * LZ4_versionString(void)
library version string; useful to check dll version
char int int maxOutputSize
LZ4LIB_API int LZ4_compress_destSize(const char *src, char *dst, int *srcSizePtr, int targetDstSize)
LZ4_stream_t_internal internal_donotuse
LZ4LIB_API void LZ4_resetStream(LZ4_stream_t *streamPtr)
LZ4LIB_API int LZ4_freeStreamDecode(LZ4_streamDecode_t *LZ4_stream)
LZ4LIB_API int LZ4_compressBound(int inputSize)
LZ4LIB_API LZ4_streamDecode_t * LZ4_createStreamDecode(void)
LZ4LIB_API int LZ4_versionNumber(void)
library version number; useful to check dll version
LZ4LIB_API int LZ4_compress_fast_extState(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API LZ4_stream_t * LZ4_createStream(void)
unsigned __int32 uint32_t
LZ4LIB_API int LZ4_compress_default(const char *src, char *dst, int srcSize, int dstCapacity)
unsigned int currentOffset
LZ4LIB_API int LZ4_freeStream(LZ4_stream_t *streamPtr)
LZ4LIB_API int LZ4_sizeofState(void)
LZ4LIB_API LZ4_stream_t * LZ4_initStream(void *buffer, size_t size)
LZ4LIB_API int LZ4_loadDict(LZ4_stream_t *streamPtr, const char *dictionary, int dictSize)
LZ4LIB_API int LZ4_saveDict(LZ4_stream_t *streamPtr, char *safeBuffer, int maxDictSize)
LZ4LIB_API int LZ4_decompress_safe(const char *src, char *dst, int compressedSize, int dstCapacity)
LZ4_streamDecode_t_internal internal_donotuse
#define LZ4_STREAMDECODESIZE_U64
Wrapper structure for dynamically allocated memory.
LZ4LIB_API void LZ4_resetStream_fast(LZ4_stream_t *streamPtr)
LZ4LIB_API int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int originalSize)
unsigned __int16 uint16_t
const unsigned char * externalDict
#define LZ4_STREAMSIZE_U64
LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize)