diff --git a/include/linux/lz4.h b/include/linux/lz4.h index 7f5af8471a06..d8e86e533e2f 100644 --- a/include/linux/lz4.h +++ b/include/linux/lz4.h @@ -296,7 +296,6 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize); int LZ4_decompress_safe(const char *source, char *dest, int compressedSize, int maxDecompressedSize); -#if 0 /** * LZ4_decompress_safe_partial() - Decompress a block of size 'compressedSize' * at position 'source' into buffer 'dest' @@ -322,9 +321,8 @@ int LZ4_decompress_safe(const char *source, char *dest, int compressedSize, * or a negative result in case of error * */ -static int LZ4_decompress_safe_partial(const char *source, char *dest, +int LZ4_decompress_safe_partial(const char *source, char *dest, int compressedSize, int targetOutputSize, int maxDecompressedSize); -#endif /*-************************************************************************ * LZ4 HC Compression diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c index fb7bc5580164..96f9c7a747b6 100644 --- a/lib/lz4/lz4_decompress.c +++ b/lib/lz4/lz4_decompress.c @@ -691,8 +691,7 @@ int LZ4_decompress_safe(const char *source, char *dest, noDict, (BYTE *)dest, NULL, 0); } -#if 0 -static int LZ4_decompress_safe_partial(const char *src, char *dst, +int LZ4_decompress_safe_partial(const char *src, char *dst, int compressedSize, int targetOutputSize, int dstCapacity) { dstCapacity = min(targetOutputSize, dstCapacity); @@ -700,7 +699,6 @@ static int LZ4_decompress_safe_partial(const char *src, char *dst, endOnInputSize, partial_decode, noDict, (BYTE *)dst, NULL, 0); } -#endif int LZ4_decompress_fast(const char *source, char *dest, int originalSize) {