35 #ifndef LZ4_H_2983827168210
36 #define LZ4_H_2983827168210
38 #if defined (__cplusplus)
76 #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
77 # define LZ4LIB_API __declspec(dllexport)
78 #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
79 # define LZ4LIB_API __declspec(dllimport)
86 #define LZ4_VERSION_MAJOR 1
87 #define LZ4_VERSION_MINOR 7
88 #define LZ4_VERSION_RELEASE 5
90 #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
92 #define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE
93 #define LZ4_QUOTE(str) #str
94 #define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str)
95 #define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION)
111 #ifndef LZ4_MEMORY_USAGE
112 # define LZ4_MEMORY_USAGE 14
148 #define LZ4_MAX_INPUT_SIZE 0x7E000000
149 #define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
330 #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2)
331 #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE)
332 #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG)
334 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) )
339 uint32_t currentOffset;
341 const uint8_t* dictionary;
342 uint8_t* bufferStart;
347 const uint8_t* externalDict;
349 const uint8_t* prefixEnd;
381 #define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4)
382 #define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long))
397 #define LZ4_STREAMDECODESIZE_U64 4
398 #define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
415 #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS
416 # define LZ4_DEPRECATED(message)
418 # define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
419 # if defined (__cplusplus) && (__cplusplus >= 201402)
420 # define LZ4_DEPRECATED(message) [[deprecated(message)]]
421 # elif (LZ4_GCC_VERSION >= 405) || defined(__clang__)
422 # define LZ4_DEPRECATED(message) __attribute__((deprecated(message)))
423 # elif (LZ4_GCC_VERSION >= 301)
424 # define LZ4_DEPRECATED(message) __attribute__((deprecated))
425 # elif defined(_MSC_VER)
426 # define LZ4_DEPRECATED(message) __declspec(deprecated(message))
428 # pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler")
429 # define LZ4_DEPRECATED(message)
462 #if defined (__cplusplus)