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)
336 #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2)
337 #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE)
338 #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG)
340 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) )
387 #define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4)
388 #define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long))
403 #define LZ4_STREAMDECODESIZE_U64 4
404 #define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
421 #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS
422 # define LZ4_DEPRECATED(message)
424 # define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
425 # if defined (__cplusplus) && (__cplusplus >= 201402)
426 # define LZ4_DEPRECATED(message) [[deprecated(message)]]
427 # elif (LZ4_GCC_VERSION >= 405) || defined(__clang__)
428 # define LZ4_DEPRECATED(message) __attribute__((deprecated(message)))
429 # elif (LZ4_GCC_VERSION >= 301)
430 # define LZ4_DEPRECATED(message) __attribute__((deprecated))
431 # elif defined(_MSC_VER)
432 # define LZ4_DEPRECATED(message) __declspec(deprecated(message))
434 # pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler")
435 # define LZ4_DEPRECATED(message)
468 #if defined (__cplusplus)