diff options
author | Lioncash <mathew1800@gmail.com> | 2021-05-24 05:32:32 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-05-24 15:01:04 -0400 |
commit | 49bfd0c46145b8f69e52077b83278038d514caf4 (patch) | |
tree | bc7a1a88592b486641571be8997ce9357275b4c2 /src/common/zstd_compression.h | |
parent | 00213377b1b09fadce55cc3e3562adb5c4d1e1c4 (diff) |
zstd_compression: Make use of std::span
Allows for the incoming data stream to be non-allocating.
Diffstat (limited to 'src/common/zstd_compression.h')
-rw-r--r-- | src/common/zstd_compression.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/zstd_compression.h b/src/common/zstd_compression.h index c26a30ab9d..bbce14f4e1 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" @@ -40,6 +41,6 @@ namespace Common::Compression { * * @return the decompressed data. */ -[[nodiscard]] std::vector<u8> DecompressDataZSTD(const std::vector<u8>& compressed); +[[nodiscard]] std::vector<u8> DecompressDataZSTD(std::span<const u8> compressed); -} // namespace Common::Compression
\ No newline at end of file +} // namespace Common::Compression |