diff --git a/src/papi/lz4/api.h b/src/papi/lz4/api.h index e5d348f..5570fe2 100644 --- a/src/papi/lz4/api.h +++ b/src/papi/lz4/api.h @@ -75,12 +75,12 @@ namespace lz4 { namespace api { */ int compress_default(const span source, const span dest); - int decompress_safe (const span source, span dest); + int decompress_safe (const span source, const span dest); int sizeofState(); - int compress_fast_extState(span state, const span source, span dest, int acceleration); - int compress_destSize (span& source, span dest); - int decompress_fast (const span source, span dest, int uncompressedSize); - int decompress_safe_partial (const span source, span dest, int targetOutputSize); + int compress_fast_extState(span state, const span source, const span dest, int acceleration); + int compress_destSize (span& source, const span dest); + int decompress_fast (const span source, const span dest, int uncompressedSize); + int decompress_safe_partial (const span source, const span dest, int targetOutputSize); }; }; diff --git a/src/papi/lz4/api_impl.h b/src/papi/lz4/api_impl.h index a0f4ba8..8bfeab1 100644 --- a/src/papi/lz4/api_impl.h +++ b/src/papi/lz4/api_impl.h @@ -18,7 +18,7 @@ namespace lz4 { namespace api { return _detail::LZ4_compress_default(source.data(), dest.data(), source.length(), dest.length()); }; - inline int decompress_safe (const span source, span dest) + inline int decompress_safe (const span source, const span dest) { return _detail::LZ4_decompress_safe(source.data(), dest.data(), source.length(), dest.length()); }; @@ -28,12 +28,12 @@ namespace lz4 { namespace api { return _detail::LZ4_sizeofState(); }; - inline int compress_fast_extState(span state, const span source, span dest, int acceleration) + inline int compress_fast_extState(span state, const span source, const span dest, int acceleration) { return _detail::LZ4_compress_fast_extState(state.data(), source.data(), dest.data(), source.length(), dest.length(), acceleration); }; - inline int compress_destSize (span& source, span dest) + inline int compress_destSize (span& source, const span dest) { auto sourceSize = source.length(); volatile int sourceUsed = sourceSize; @@ -44,12 +44,12 @@ namespace lz4 { namespace api { return _detail::LZ4_compress_destSize(source.data(), dest.data(), const_cast(&sourceUsed), dest.length()); }; - inline int decompress_fast (const span source, span dest, int uncompressedSize) + inline int decompress_fast (const span source, const span dest, int uncompressedSize) { return _detail::LZ4_decompress_fast(source.data(), dest.data(), uncompressedSize); }; - inline int decompress_safe_partial (const span source, span dest, int targetOutputSize) + inline int decompress_safe_partial (const span source, const span dest, int targetOutputSize) { return _detail::LZ4_decompress_safe_partial (source.data(), dest.data(), source.length(), targetOutputSize, dest.length()); };