diff options
author | Liam <byteslice@airmail.cc> | 2023-08-11 03:34:43 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-08-15 23:47:25 +0200 |
commit | 86f6b6b7b2d930e8203114332b04a5c49a780b06 (patch) | |
tree | bf7ff58b0a36051d3c3489a40999d80357c570d0 /src/common/lz4_compression.cpp | |
parent | Merge pull request #11287 from liamwhite/replaced-bytes (diff) | |
download | yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.gz yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.bz2 yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.lz yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.xz yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.tar.zst yuzu-86f6b6b7b2d930e8203114332b04a5c49a780b06.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/lz4_compression.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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<u8> DecompressDataLZ4(std::span<const u8> 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<const char*>(src), reinterpret_cast<char*>(dst), + static_cast<int>(src_size), static_cast<int>(dst_size)); +} + } // namespace Common::Compression |