diff options
author | Lioncash <mathew1800@gmail.com> | 2020-07-25 09:11:14 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-07-25 09:11:56 +0200 |
commit | c5bdccfecb279ba581e5931f7fd9678d1aaa8f85 (patch) | |
tree | 8d12aff0d6624729521ea9a5950308fd2731aa18 /src/common/zstd_compression.h | |
parent | Merge pull request #4383 from ogniK5377/dark-checkbox (diff) | |
download | yuzu-c5bdccfecb279ba581e5931f7fd9678d1aaa8f85.tar yuzu-c5bdccfecb279ba581e5931f7fd9678d1aaa8f85.tar.gz yuzu-c5bdccfecb279ba581e5931f7fd9678d1aaa8f85.tar.bz2 yuzu-c5bdccfecb279ba581e5931f7fd9678d1aaa8f85.tar.lz yuzu-c5bdccfecb279ba581e5931f7fd9678d1aaa8f85.tar.xz yuzu-c5bdccfecb279ba581e5931f7fd9678d1aaa8f85.tar.zst yuzu-c5bdccfecb279ba581e5931f7fd9678d1aaa8f85.zip |
Diffstat (limited to 'src/common/zstd_compression.h')
-rw-r--r-- | src/common/zstd_compression.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/common/zstd_compression.h b/src/common/zstd_compression.h index e9de941c8..b5edf19e7 100644 --- a/src/common/zstd_compression.h +++ b/src/common/zstd_compression.h @@ -4,6 +4,7 @@ #pragma once +#include <span> #include <vector> #include "common/common_types.h" @@ -14,23 +15,21 @@ namespace Common::Compression { * Compresses a source memory region with Zstandard and returns the compressed data in a vector. * * @param source the uncompressed source memory region. - * @param source_size the size in bytes of the uncompressed source memory region. * @param compression_level the used compression level. Should be between 1 and 22. * * @return the compressed data. */ -std::vector<u8> CompressDataZSTD(const u8* source, std::size_t source_size, s32 compression_level); +std::vector<u8> CompressDataZSTD(std::span<const u8> source, s32 compression_level); /** * Compresses a source memory region with Zstandard with the default compression level and returns * the compressed data in a vector. * * @param source the uncompressed source memory region. - * @param source_size the size in bytes of the uncompressed source memory region. * * @return the compressed data. */ -std::vector<u8> CompressDataZSTDDefault(const u8* source, std::size_t source_size); +std::vector<u8> CompressDataZSTDDefault(std::span<const u8> source); /** * Decompresses a source memory region with Zstandard and returns the uncompressed data in a vector. |