diff --git a/include/linux/lz4.h b/include/linux/lz4.h index 263b98ff4221..e2b77913050c 100755 --- a/include/linux/lz4.h +++ b/include/linux/lz4.h @@ -218,7 +218,7 @@ int LZ4_compress_default(const char *source, char *dest, int inputSize, * Return: Number of bytes written into buffer 'dest' * (necessarily <= maxOutputSize) or 0 if compression fails */ -static int LZ4_compress_fast(const char *source, char *dest, int inputSize, +int LZ4_compress_fast(const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration, void *wrkmem); /** @@ -242,7 +242,7 @@ static int LZ4_compress_fast(const char *source, char *dest, int inputSize, * Return: Number of bytes written into 'dest' (necessarily <= targetDestSize) * or 0 if compression fails */ -static int LZ4_compress_destSize(const char *source, char *dest, int *sourceSizePtr, +int LZ4_compress_destSize(const char *source, char *dest, int *sourceSizePtr, int targetDestSize, void *wrkmem); /*-************************************************************************ @@ -358,7 +358,7 @@ int LZ4_compress_HC(const char *src, char *dst, int srcSize, int dstCapacity, * Use this function to init an allocated `LZ4_streamHC_t` structure * and start a new compression. */ -static void LZ4_resetStreamHC(LZ4_streamHC_t *streamHCPtr, int compressionLevel); +void LZ4_resetStreamHC(LZ4_streamHC_t *streamHCPtr, int compressionLevel); /** * LZ4_loadDictHC() - Load a static dictionary into LZ4_streamHC @@ -373,7 +373,7 @@ static void LZ4_resetStreamHC(LZ4_streamHC_t *streamHCPtr, int compressionLevel) * * Return : dictionary size, in bytes (necessarily <= 64 KB) */ -static int LZ4_loadDictHC(LZ4_streamHC_t *streamHCPtr, const char *dictionary, +int LZ4_loadDictHC(LZ4_streamHC_t *streamHCPtr, const char *dictionary, int dictSize); /** @@ -412,7 +412,7 @@ static int LZ4_loadDictHC(LZ4_streamHC_t *streamHCPtr, const char *dictionary, * * Return: Number of bytes written into buffer 'dst' or 0 if compression fails */ -static int LZ4_compress_HC_continue(LZ4_streamHC_t *streamHCPtr, const char *src, +int LZ4_compress_HC_continue(LZ4_streamHC_t *streamHCPtr, const char *src, char *dst, int srcSize, int maxDstSize); /** @@ -431,7 +431,7 @@ static int LZ4_compress_HC_continue(LZ4_streamHC_t *streamHCPtr, const char *src * Return : saved dictionary size in bytes (necessarily <= maxDictSize), * or 0 if error. */ -static int LZ4_saveDictHC(LZ4_streamHC_t *streamHCPtr, char *safeBuffer, +int LZ4_saveDictHC(LZ4_streamHC_t *streamHCPtr, char *safeBuffer, int maxDictSize); /*-********************************************* @@ -447,7 +447,7 @@ static int LZ4_saveDictHC(LZ4_streamHC_t *streamHCPtr, char *safeBuffer, * Use this function to init an allocated `LZ4_stream_t` structure * and start a new compression. */ -static __always_inline void LZ4_resetStream(LZ4_stream_t *LZ4_stream); +__always_inline void LZ4_resetStream(LZ4_stream_t *LZ4_stream); /** * LZ4_loadDict() - Load a static dictionary into LZ4_stream @@ -504,7 +504,7 @@ int LZ4_saveDict(LZ4_stream_t *streamPtr, char *safeBuffer, int dictSize); * * Return: Number of bytes written into buffer 'dst' or 0 if compression fails */ -static int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src, +int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src, char *dst, int srcSize, int maxDstSize, int acceleration); /** @@ -518,7 +518,7 @@ static int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src, * * Return: 1 if OK, 0 if error */ -static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, +int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize); /** @@ -557,7 +557,7 @@ static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, * (necessarily <= maxDecompressedSize) * or a negative result in case of error */ -static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, +int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int compressedSize, int maxDecompressedSize); @@ -596,7 +596,7 @@ static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, * (necessarily <= maxDecompressedSize) * or a negative result in case of error */ -static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, +int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int originalSize); /** @@ -619,7 +619,7 @@ static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, * (necessarily <= maxDecompressedSize) * or a negative result in case of error */ -static int LZ4_decompress_safe_usingDict(const char *source, char *dest, +int LZ4_decompress_safe_usingDict(const char *source, char *dest, int compressedSize, int maxDecompressedSize, const char *dictStart, int dictSize); @@ -642,7 +642,7 @@ static int LZ4_decompress_safe_usingDict(const char *source, char *dest, * (necessarily <= maxDecompressedSize) * or a negative result in case of error */ -static int LZ4_decompress_fast_usingDict(const char *source, char *dest, +int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize); #endif diff --git a/lib/lz4/lz4_compress.c b/lib/lz4/lz4_compress.c index ee20d9d2bbdf..86b346e2e891 100755 --- a/lib/lz4/lz4_compress.c +++ b/lib/lz4/lz4_compress.c @@ -500,7 +500,7 @@ static int LZ4_compress_fast_extState( } } -static int LZ4_compress_fast(const char *source, char *dest, int inputSize, +int LZ4_compress_fast(const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration, void *wrkmem) { return LZ4_compress_fast_extState(wrkmem, source, dest, inputSize, @@ -751,7 +751,7 @@ static int LZ4_compress_destSize_extState( } -static int LZ4_compress_destSize( +int LZ4_compress_destSize( const char *src, char *dst, int *srcSizePtr, @@ -765,7 +765,7 @@ static int LZ4_compress_destSize( /*-****************************** * Streaming functions ********************************/ -static FORCE_INLINE void LZ4_resetStream(LZ4_stream_t *LZ4_stream) +FORCE_INLINE void LZ4_resetStream(LZ4_stream_t *LZ4_stream) { memset(LZ4_stream, 0, sizeof(LZ4_stream_t)); } @@ -852,7 +852,7 @@ int LZ4_saveDict(LZ4_stream_t *LZ4_dict, char *safeBuffer, int dictSize) } EXPORT_SYMBOL(LZ4_saveDict); -static int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source, +int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize, int maxOutputSize, int acceleration) { LZ4_stream_t_internal *streamPtr = &LZ4_stream->internal_donotuse; diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c index cf0feb633370..0c891b63d97d 100755 --- a/lib/lz4/lz4_decompress.c +++ b/lib/lz4/lz4_decompress.c @@ -557,7 +557,7 @@ int LZ4_decompress_fast_doubleDict(const char *source, char *dest, /* ===== streaming decompression functions ===== */ -static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, +int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize) { LZ4_streamDecode_t_internal *lz4sd = @@ -580,7 +580,7 @@ static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, * decoded data into a safe buffer, * and indicate where it stands using LZ4_setStreamDecode() */ -static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, +int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int compressedSize, int maxOutputSize) { LZ4_streamDecode_t_internal *lz4sd = @@ -633,7 +633,7 @@ static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, return result; } -static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, +int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int originalSize) { LZ4_streamDecode_t_internal *lz4sd = &LZ4_streamDecode->internal_donotuse; @@ -672,7 +672,7 @@ static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, return result; } -static int LZ4_decompress_safe_usingDict(const char *source, char *dest, +int LZ4_decompress_safe_usingDict(const char *source, char *dest, int compressedSize, int maxOutputSize, const char *dictStart, int dictSize) { @@ -690,7 +690,7 @@ static int LZ4_decompress_safe_usingDict(const char *source, char *dest, compressedSize, maxOutputSize, dictStart, dictSize); } -static int LZ4_decompress_fast_usingDict(const char *source, char *dest, +int LZ4_decompress_fast_usingDict(const char *source, char *dest, int originalSize, const char *dictStart, int dictSize) { diff --git a/lib/lz4/lz4hc_compress.c b/lib/lz4/lz4hc_compress.c index eb5d0e5c42b4..5d4444b2db63 100755 --- a/lib/lz4/lz4hc_compress.c +++ b/lib/lz4/lz4hc_compress.c @@ -616,13 +616,13 @@ EXPORT_SYMBOL(LZ4_compress_HC); /************************************** * Streaming Functions **************************************/ -static void LZ4_resetStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel) +void LZ4_resetStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel) { LZ4_streamHCPtr->internal_donotuse.base = NULL; LZ4_streamHCPtr->internal_donotuse.compressionLevel = (unsigned int)compressionLevel; } -static int LZ4_loadDictHC(LZ4_streamHC_t *LZ4_streamHCPtr, +int LZ4_loadDictHC(LZ4_streamHC_t *LZ4_streamHCPtr, const char *dictionary, int dictSize) { @@ -713,7 +713,7 @@ static int LZ4_compressHC_continue_generic( inputSize, maxOutputSize, ctxPtr->compressionLevel, limit); } -static int LZ4_compress_HC_continue( +int LZ4_compress_HC_continue( LZ4_streamHC_t *LZ4_streamHCPtr, const char *source, char *dest, @@ -730,7 +730,7 @@ static int LZ4_compress_HC_continue( /* dictionary saving */ -static int LZ4_saveDictHC( +int LZ4_saveDictHC( LZ4_streamHC_t *LZ4_streamHCPtr, char *safeBuffer, int dictSize)