From 86f6b6b7b2d930e8203114332b04a5c49a780b06 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 10 Aug 2023 21:34:43 -0400 Subject: vfs: expand support for NCA reading --- src/common/lz4_compression.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common/lz4_compression.cpp') diff --git a/src/common/lz4_compression.cpp b/src/common/lz4_compression.cpp index ffb32fecf..6867c03c4 100644 --- a/src/common/lz4_compression.cpp +++ b/src/common/lz4_compression.cpp @@ -71,4 +71,10 @@ std::vector DecompressDataLZ4(std::span compressed, std::size_t un return uncompressed; } +int DecompressLZ4(void* dst, size_t dst_size, const void* src, size_t src_size) { + // This is just a thin wrapper around LZ4. + return LZ4_decompress_safe(reinterpret_cast(src), reinterpret_cast(dst), + static_cast(src_size), static_cast(dst_size)); +} + } // namespace Common::Compression -- cgit v1.2.3