Go to the documentation of this file.
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
112 #if defined(LZ4_FREESTANDING) && (LZ4_FREESTANDING == 1)
113 # define LZ4_HEAPMODE 0
114 # define LZ4HC_HEAPMODE 0
115 # define LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION 1
116 # if !defined(LZ4_memcpy)
117 # error "LZ4_FREESTANDING requires macro 'LZ4_memcpy'."
119 # if !defined(LZ4_memset)
120 # error "LZ4_FREESTANDING requires macro 'LZ4_memset'."
122 # if !defined(LZ4_memmove)
123 # error "LZ4_FREESTANDING requires macro 'LZ4_memmove'."
125 #elif ! defined(LZ4_FREESTANDING)
126 # define LZ4_FREESTANDING 0
131 #define LZ4_VERSION_MAJOR 1
132 #define LZ4_VERSION_MINOR 9
133 #define LZ4_VERSION_RELEASE 4
135 #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
137 #define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE
138 #define LZ4_QUOTE(str) #str
139 #define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str)
140 #define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION)
149 #define LZ4_MEMORY_USAGE_MIN 10
150 #define LZ4_MEMORY_USAGE_DEFAULT 14
151 #define LZ4_MEMORY_USAGE_MAX 20
160 #ifndef LZ4_MEMORY_USAGE
161 # define LZ4_MEMORY_USAGE LZ4_MEMORY_USAGE_DEFAULT
164 #if (LZ4_MEMORY_USAGE < LZ4_MEMORY_USAGE_MIN)
165 # error "LZ4_MEMORY_USAGE is too small !"
168 #if (LZ4_MEMORY_USAGE > LZ4_MEMORY_USAGE_MAX)
169 # error "LZ4_MEMORY_USAGE is too large !"
211 #define LZ4_MAX_INPUT_SIZE 0x7E000000
212 #define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
327 #if !defined(RC_INVOKED)
328 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
416 #if !defined(RC_INVOKED)
417 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
444 #define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize) (65536 + 14 + (maxBlockSize))
473 const char* src,
char*
dst,
488 const char* dictStart,
int dictSize);
494 const char* dictStart,
int dictSize);
523 #ifdef LZ4_STATIC_LINKING_ONLY
525 #ifndef LZ4_STATIC_3504398509
526 #define LZ4_STATIC_3504398509
528 #ifdef LZ4_PUBLISH_STATIC_FUNCTIONS
529 #define LZ4LIB_STATIC_API LZ4LIB_API
531 #define LZ4LIB_STATIC_API
573 LZ4LIB_STATIC_API
void
629 #define LZ4_DECOMPRESS_INPLACE_MARGIN(compressedSize) (((compressedSize) >> 8) + 32)
630 #define LZ4_DECOMPRESS_INPLACE_BUFFER_SIZE(decompressedSize) ((decompressedSize) + LZ4_DECOMPRESS_INPLACE_MARGIN(decompressedSize))
632 #ifndef LZ4_DISTANCE_MAX
633 # define LZ4_DISTANCE_MAX 65535
636 #define LZ4_COMPRESS_INPLACE_MARGIN (LZ4_DISTANCE_MAX + 32)
637 #define LZ4_COMPRESS_INPLACE_BUFFER_SIZE(maxCompressedSize) ((maxCompressedSize) + LZ4_COMPRESS_INPLACE_MARGIN)
644 #ifndef LZ4_H_98237428734687
645 #define LZ4_H_98237428734687
654 #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2)
655 #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE)
656 #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG)
658 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) )
688 #define LZ4_STREAM_MINSIZE ((1UL << LZ4_MEMORY_USAGE) + 32)
724 #define LZ4_STREAMDECODE_MINSIZE 32
747 #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS
748 # define LZ4_DEPRECATED(message)
750 # if defined (__cplusplus) && (__cplusplus >= 201402)
751 # define LZ4_DEPRECATED(message) [[deprecated(message)]]
752 # elif defined(_MSC_VER)
753 # define LZ4_DEPRECATED(message) __declspec(deprecated(message))
754 # elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 45))
755 # define LZ4_DEPRECATED(message) __attribute__((deprecated(message)))
756 # elif defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 31)
757 # define LZ4_DEPRECATED(message) __attribute__((deprecated))
759 # pragma message("WARNING: LZ4_DEPRECATED needs custom implementation for this compiler")
760 # define LZ4_DEPRECATED(message)
840 #if defined (__cplusplus)
int LZ4_decompress_fast_withPrefix64k(const char *source, char *dest, int originalSize)
LZ4LIB_API int LZ4_compress_fast_extState(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
int LZ4_compress(const char *src, char *dest, int srcSize)
int LZ4_sizeofStreamState(void)
LZ4LIB_API int LZ4_sizeofState(void)
#define LZ4_STREAM_MINSIZE
int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize)
int LZ4_compress_fast_extState_fastReset(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int originalSize)
int LZ4_uncompress(const char *source, char *dest, int outputSize)
LZ4LIB_API int LZ4_compressBound(int inputSize)
void * LZ4_create(char *inputBuffer)
const LZ4_byte * externalDict
const LZ4_byte * prefixEnd
int LZ4_compress_limitedOutput(const char *source, char *dest, int inputSize, int maxOutputSize)
LZ4LIB_API LZ4_stream_t * LZ4_createStream(void)
LZ4LIB_API int LZ4_decompress_fast_usingDict(const char *src, char *dst, int originalSize, const char *dictStart, int dictSize)
int LZ4_resetStreamState(void *state, char *inputBuffer)
LZ4LIB_API int LZ4_decompress_safe_partial_usingDict(const char *src, char *dst, int compressedSize, int targetOutputSize, int maxOutputSize, const char *dictStart, int dictSize)
span_constexpr std::size_t size(span< T, Extent > const &spn)
int LZ4_compress_limitedOutput_continue(LZ4_stream_t *LZ4_stream, const char *src, char *dst, int srcSize, int dstCapacity)
const LZ4_byte * dictionary
LZ4LIB_API int LZ4_versionNumber(void)
LZ4LIB_API int LZ4_freeStreamDecode(LZ4_streamDecode_t *LZ4_stream)
int LZ4_compress_limitedOutput_withState(void *state, const char *src, char *dst, int srcSize, int dstSize)
void LZ4_attach_dictionary(LZ4_stream_t *workingStream, const LZ4_stream_t *dictionaryStream)
const char char int inputSize
LZ4LIB_API int LZ4_loadDict(LZ4_stream_t *streamPtr, const char *dictionary, int dictSize)
LZ4LIB_API int LZ4_decompress_safe(const char *src, char *dst, int compressedSize, int dstCapacity)
LZ4LIB_API int LZ4_decompress_safe_partial(const char *src, char *dst, int srcSize, int targetOutputSize, int dstCapacity)
#define LZ4_DEPRECATED(message)
LZ4_streamDecode_t_internal internal_donotuse
LZ4_u32 hashTable[LZ4_HASH_SIZE_U32]
char int int maxOutputSize
LZ4_FORCE_O2 int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest, int compressedSize, int maxOutputSize)
LZ4LIB_API int LZ4_freeStream(LZ4_stream_t *streamPtr)
#define LZ4_STREAMDECODE_MINSIZE
LZ4LIB_API int LZ4_decompress_safe_usingDict(const char *src, char *dst, int srcSize, int dstCapacity, const char *dictStart, int dictSize)
LZ4LIB_API void LZ4_resetStream(LZ4_stream_t *streamPtr)
LZ4LIB_API int LZ4_compress_fast(const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int LZ4_saveDict(LZ4_stream_t *streamPtr, char *safeBuffer, int maxDictSize)
char minStateSize[LZ4_STREAMDECODE_MINSIZE]
LZ4LIB_API void LZ4_resetStream_fast(LZ4_stream_t *streamPtr)
int LZ4_compress_withState(void *state, const char *src, char *dst, int srcSize)
LZ4LIB_API LZ4_streamDecode_t * LZ4_createStreamDecode(void)
int LZ4_compress_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize)
LZ4LIB_API int LZ4_decompress_fast(const char *src, char *dst, int originalSize)
LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize)
LZ4_stream_t_internal internal_donotuse
LZ4LIB_API int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int srcSize, int dstCapacity)
LZ4LIB_API int LZ4_compress_default(const char *src, char *dst, int srcSize, int dstCapacity)
LZ4LIB_API int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
char * LZ4_slideInputBuffer(void *state)
char minStateSize[LZ4_STREAM_MINSIZE]
LZ4LIB_API int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API LZ4_stream_t * LZ4_initStream(void *buffer, size_t size)
const LZ4_stream_t_internal * dictCtx
#define LZ4_HASH_SIZE_U32
LZ4LIB_API int LZ4_compress_destSize(const char *src, char *dst, int *srcSizePtr, int targetDstSize)
const LZ4LIB_API char * LZ4_versionString(void)
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45