diff options
author | Kouhei Sutou <kou@clear-code.com> | 2016-09-23 01:38:33 (GMT) |
---|---|---|
committer | Kouhei Sutou <kou@clear-code.com> | 2016-09-23 01:38:44 (GMT) |
commit | 59771f41cdcb6be2a8fcb8a256b2511684baf956 (patch) | |
tree | e44b7f469f460724f5fc53c450e85a8f0d3e1936 /lib | |
parent | 012c66536cdb93d9bcfa565fadaaf2a281c489b9 (diff) | |
download | lz4-59771f41cdcb6be2a8fcb8a256b2511684baf956.zip lz4-59771f41cdcb6be2a8fcb8a256b2511684baf956.tar.gz lz4-59771f41cdcb6be2a8fcb8a256b2511684baf956.tar.bz2 |
Use different prefix for each file to avoid conflict
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4frame.h | 46 | ||||
-rw-r--r-- | lib/lz4hc.h | 36 |
2 files changed, 41 insertions, 41 deletions
diff --git a/lib/lz4frame.h b/lib/lz4frame.h index d1cfa0c..a70d0e0 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -58,12 +58,12 @@ extern "C" { */ #if defined(_WIN32) # if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) -# define LZ4LIB_API __declspec(dllexport) +# define LZ4FLIB_API __declspec(dllexport) # else -# define LZ4LIB_API __declspec(dllimport) +# define LZ4FLIB_API __declspec(dllimport) # endif #else -# define LZ4LIB_API +# define LZ4FLIB_API #endif /*-************************************ @@ -71,8 +71,8 @@ extern "C" { **************************************/ typedef size_t LZ4F_errorCode_t; -LZ4LIB_API unsigned LZ4F_isError(LZ4F_errorCode_t code); -LZ4LIB_API const char* LZ4F_getErrorName(LZ4F_errorCode_t code); /* return error code string; useful for debugging */ +LZ4FLIB_API unsigned LZ4F_isError(LZ4F_errorCode_t code); +LZ4FLIB_API const char* LZ4F_getErrorName(LZ4F_errorCode_t code); /* return error code string; useful for debugging */ /*-************************************ @@ -144,7 +144,7 @@ typedef struct { /*-********************************* * Simple compression function ***********************************/ -LZ4LIB_API size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr); +LZ4FLIB_API size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences_t* preferencesPtr); /*!LZ4F_compressFrame() : * Compress an entire srcBuffer into a valid LZ4 frame, as defined by specification v1.5.1 @@ -155,7 +155,7 @@ LZ4LIB_API size_t LZ4F_compressFrameBound(size_t srcSize, const LZ4F_preferences * The result of the function is the number of bytes written into dstBuffer. * The function outputs an error code if it fails (can be tested using LZ4F_isError()) */ -LZ4LIB_API size_t LZ4F_compressFrame(void* dstBuffer, size_t dstMaxSize, const void* srcBuffer, size_t srcSize, const LZ4F_preferences_t* preferencesPtr); +LZ4FLIB_API size_t LZ4F_compressFrame(void* dstBuffer, size_t dstMaxSize, const void* srcBuffer, size_t srcSize, const LZ4F_preferences_t* preferencesPtr); @@ -172,8 +172,8 @@ typedef struct { /* Resource Management */ #define LZ4F_VERSION 100 -LZ4LIB_API LZ4F_errorCode_t LZ4F_createCompressionContext(LZ4F_compressionContext_t* cctxPtr, unsigned version); -LZ4LIB_API LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_compressionContext_t cctx); +LZ4FLIB_API LZ4F_errorCode_t LZ4F_createCompressionContext(LZ4F_compressionContext_t* cctxPtr, unsigned version); +LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_compressionContext_t cctx); /* LZ4F_createCompressionContext() : * The first thing to do is to create a compressionContext object, which will be used in all compression operations. * This is achieved using LZ4F_createCompressionContext(), which takes as argument a version and an LZ4F_preferences_t structure. @@ -186,7 +186,7 @@ LZ4LIB_API LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_compressionContext_ /* Compression */ -LZ4LIB_API size_t LZ4F_compressBegin(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const LZ4F_preferences_t* prefsPtr); +LZ4FLIB_API size_t LZ4F_compressBegin(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const LZ4F_preferences_t* prefsPtr); /* LZ4F_compressBegin() : * will write the frame header into dstBuffer. * dstBuffer must be large enough to accommodate a header (dstMaxSize). Maximum header size is 15 bytes. @@ -195,7 +195,7 @@ LZ4LIB_API size_t LZ4F_compressBegin(LZ4F_compressionContext_t cctx, void* dstBu * or an error code (can be tested using LZ4F_isError()) */ -LZ4LIB_API size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* prefsPtr); +LZ4FLIB_API size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* prefsPtr); /* LZ4F_compressBound() : * Provides the minimum size of Dst buffer given srcSize to handle worst case situations. * Different preferences can produce different results. @@ -203,7 +203,7 @@ LZ4LIB_API size_t LZ4F_compressBound(size_t srcSize, const LZ4F_preferences_t* p * This function includes frame termination cost (4 bytes, or 8 if frame checksum is enabled) */ -LZ4LIB_API size_t LZ4F_compressUpdate(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const void* srcBuffer, size_t srcSize, const LZ4F_compressOptions_t* cOptPtr); +LZ4FLIB_API size_t LZ4F_compressUpdate(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const void* srcBuffer, size_t srcSize, const LZ4F_compressOptions_t* cOptPtr); /* LZ4F_compressUpdate() * LZ4F_compressUpdate() can be called repetitively to compress as much data as necessary. * The most important rule is that dstBuffer MUST be large enough (dstMaxSize) to ensure compression completion even in worst case. @@ -215,7 +215,7 @@ LZ4LIB_API size_t LZ4F_compressUpdate(LZ4F_compressionContext_t cctx, void* dstB * The function outputs an error code if it fails (can be tested using LZ4F_isError()) */ -LZ4LIB_API size_t LZ4F_flush(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const LZ4F_compressOptions_t* cOptPtr); +LZ4FLIB_API size_t LZ4F_flush(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const LZ4F_compressOptions_t* cOptPtr); /* LZ4F_flush() * Should you need to generate compressed data immediately, without waiting for the current block to be filled, * you can call LZ4_flush(), which will immediately compress any remaining data buffered within cctx. @@ -226,7 +226,7 @@ LZ4LIB_API size_t LZ4F_flush(LZ4F_compressionContext_t cctx, void* dstBuffer, si * The function outputs an error code if it fails (can be tested using LZ4F_isError()) */ -LZ4LIB_API size_t LZ4F_compressEnd(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const LZ4F_compressOptions_t* cOptPtr); +LZ4FLIB_API size_t LZ4F_compressEnd(LZ4F_compressionContext_t cctx, void* dstBuffer, size_t dstMaxSize, const LZ4F_compressOptions_t* cOptPtr); /* LZ4F_compressEnd() * When you want to properly finish the compressed frame, just call LZ4F_compressEnd(). * It will flush whatever data remained within compressionContext (like LZ4_flush()) @@ -261,8 +261,8 @@ typedef struct { * The result of LZ4F_freeDecompressionContext() is indicative of the current state of decompressionContext when being released. * That is, it should be == 0 if decompression has been completed fully and correctly. */ -LZ4LIB_API LZ4F_errorCode_t LZ4F_createDecompressionContext(LZ4F_decompressionContext_t* dctxPtr, unsigned version); -LZ4LIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_decompressionContext_t dctx); +LZ4FLIB_API LZ4F_errorCode_t LZ4F_createDecompressionContext(LZ4F_decompressionContext_t* dctxPtr, unsigned version); +LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_decompressionContext_t dctx); /*====== Decompression ======*/ @@ -279,9 +279,9 @@ LZ4LIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_decompressionCont * (typically, when there is not enough src bytes to fully decode the frame header) * Decompression is expected to resume from where it stopped (srcBuffer + *srcSizePtr) */ -LZ4LIB_API size_t LZ4F_getFrameInfo(LZ4F_decompressionContext_t dctx, - LZ4F_frameInfo_t* frameInfoPtr, - const void* srcBuffer, size_t* srcSizePtr); +LZ4FLIB_API size_t LZ4F_getFrameInfo(LZ4F_decompressionContext_t dctx, + LZ4F_frameInfo_t* frameInfoPtr, + const void* srcBuffer, size_t* srcSizePtr); /*!LZ4F_decompress() : * Call this function repetitively to regenerate data compressed within srcBuffer. @@ -307,10 +307,10 @@ LZ4LIB_API size_t LZ4F_getFrameInfo(LZ4F_decompressionContext_t dctx, * * After a frame is fully decoded, dctx can be used again to decompress another frame. */ -LZ4LIB_API size_t LZ4F_decompress(LZ4F_decompressionContext_t dctx, - void* dstBuffer, size_t* dstSizePtr, - const void* srcBuffer, size_t* srcSizePtr, - const LZ4F_decompressOptions_t* dOptPtr); +LZ4FLIB_API size_t LZ4F_decompress(LZ4F_decompressionContext_t dctx, + void* dstBuffer, size_t* dstSizePtr, + const void* srcBuffer, size_t* srcSizePtr, + const LZ4F_decompressOptions_t* dOptPtr); diff --git a/lib/lz4hc.h b/lib/lz4hc.h index 9ce9e4d..3995ada 100644 --- a/lib/lz4hc.h +++ b/lib/lz4hc.h @@ -53,12 +53,12 @@ extern "C" { */ #if defined(_WIN32) # if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) -# define LZ4LIB_API __declspec(dllexport) +# define LZ4HCLIB_API __declspec(dllexport) # else -# define LZ4LIB_API __declspec(dllimport) +# define LZ4HCLIB_API __declspec(dllimport) # endif #else -# define LZ4LIB_API +# define LZ4HCLIB_API #endif @@ -81,7 +81,7 @@ LZ4_compress_HC() : @return : the number of bytes written into buffer 'dst' or 0 if compression fails. */ -LZ4LIB_API int LZ4_compress_HC (const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel); +LZ4HCLIB_API int LZ4_compress_HC (const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel); /* Note : @@ -101,8 +101,8 @@ LZ4_compress_HC_extStateHC() : LZ4_compress_HC_extStateHC() is equivalent to previously described function. It just uses externally allocated memory for stateHC. */ -LZ4LIB_API int LZ4_compress_HC_extStateHC(void* state, const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel); -LZ4LIB_API int LZ4_sizeofStateHC(void); +LZ4HCLIB_API int LZ4_compress_HC_extStateHC(void* state, const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel); +LZ4HCLIB_API int LZ4_sizeofStateHC(void); /*-************************************ @@ -128,15 +128,15 @@ typedef struct { size_t table[LZ4_STREAMHCSIZE_SIZET]; } LZ4_streamHC_t; If you use LZ4 as a DLL, use these functions instead of static structure allocation, to avoid size mismatch between different versions. */ -LZ4LIB_API LZ4_streamHC_t* LZ4_createStreamHC(void); -LZ4LIB_API int LZ4_freeStreamHC (LZ4_streamHC_t* streamHCPtr); +LZ4HCLIB_API LZ4_streamHC_t* LZ4_createStreamHC(void); +LZ4HCLIB_API int LZ4_freeStreamHC (LZ4_streamHC_t* streamHCPtr); -LZ4LIB_API void LZ4_resetStreamHC (LZ4_streamHC_t* streamHCPtr, int compressionLevel); -LZ4LIB_API int LZ4_loadDictHC (LZ4_streamHC_t* streamHCPtr, const char* dictionary, int dictSize); +LZ4HCLIB_API void LZ4_resetStreamHC (LZ4_streamHC_t* streamHCPtr, int compressionLevel); +LZ4HCLIB_API int LZ4_loadDictHC (LZ4_streamHC_t* streamHCPtr, const char* dictionary, int dictSize); -LZ4LIB_API int LZ4_compress_HC_continue (LZ4_streamHC_t* streamHCPtr, const char* src, char* dst, int srcSize, int maxDstSize); +LZ4HCLIB_API int LZ4_compress_HC_continue (LZ4_streamHC_t* streamHCPtr, const char* src, char* dst, int srcSize, int maxDstSize); -LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSize); +LZ4HCLIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSize); /* These functions compress data in successive blocks of any size, using previous blocks as dictionary. @@ -185,16 +185,16 @@ LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, in /* deprecated compression functions */ /* these functions will trigger warning messages in future releases */ -LZ4LIB_API int LZ4_compressHC (const char* source, char* dest, int inputSize); -LZ4LIB_API int LZ4_compressHC_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); +LZ4HCLIB_API int LZ4_compressHC (const char* source, char* dest, int inputSize); +LZ4HCLIB_API int LZ4_compressHC_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC2 (const char* source, char* dest, int inputSize, int compressionLevel); LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC2_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); -LZ4LIB_API int LZ4_compressHC_withStateHC (void* state, const char* source, char* dest, int inputSize); -LZ4LIB_API int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); +LZ4HCLIB_API int LZ4_compressHC_withStateHC (void* state, const char* source, char* dest, int inputSize); +LZ4HCLIB_API int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC2_withStateHC (void* state, const char* source, char* dest, int inputSize, int compressionLevel); LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC2_limitedOutput_withStateHC(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); -LZ4LIB_API int LZ4_compressHC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize); -LZ4LIB_API int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize, int maxOutputSize); +LZ4HCLIB_API int LZ4_compressHC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize); +LZ4HCLIB_API int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize, int maxOutputSize); /* Deprecated Streaming functions using older model; should no longer be used */ LZ4_DEPRECATED("use LZ4_createStreamHC() instead") void* LZ4_createHC (char* inputBuffer); |