aboutsummaryrefslogtreecommitdiff
path: root/src/common/lz4_compression.cpp
diff options
context:
space:
mode:
authoryuzubot <yuzu@yuzu-emu.org>2023-08-17 12:03:32 +0000
committeryuzubot <yuzu@yuzu-emu.org>2023-08-17 12:03:32 +0000
commite6afa3005981fd216c04cfe1fbb71220e321c034 (patch)
tree010dcb12e55563bf088b9d581dd14e142a856809 /src/common/lz4_compression.cpp
parenta8c4f01f6ca040672e85faaf42a8ef12d373dd65 (diff)
"Merge Tagged PR 11284"mainline-0-1528
Diffstat (limited to 'src/common/lz4_compression.cpp')
-rw-r--r--src/common/lz4_compression.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/lz4_compression.cpp b/src/common/lz4_compression.cpp
index ffb32fecfc..d85ab1742f 100644
--- a/src/common/lz4_compression.cpp
+++ b/src/common/lz4_compression.cpp
@@ -71,4 +71,10 @@ std::vector<u8> DecompressDataLZ4(std::span<const u8> compressed, std::size_t un
return uncompressed;
}
+int DecompressDataLZ4(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<const char*>(src), reinterpret_cast<char*>(dst),
+ static_cast<int>(src_size), static_cast<int>(dst_size));
+}
+
} // namespace Common::Compression