diff options
author | Lioncash <mathew1800@gmail.com> | 2021-05-24 05:28:45 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-05-24 15:00:59 -0400 |
commit | 00213377b1b09fadce55cc3e3562adb5c4d1e1c4 (patch) | |
tree | b5a8416fe37c9c78bfb2be53284ce8012df09014 /src/common/lz4_compression.h | |
parent | 5068279f23c1ae628f9298ab1a811435fd99c8cd (diff) |
lz4_compression: Make use of std::span
Allows making the incoming data stream non-allocating.
Diffstat (limited to 'src/common/lz4_compression.h')
-rw-r--r-- | src/common/lz4_compression.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/lz4_compression.h b/src/common/lz4_compression.h index 87a4be1b0..1b4717595 100644 --- a/src/common/lz4_compression.h +++ b/src/common/lz4_compression.h @@ -4,6 +4,7 @@ #pragma once +#include <span> #include <vector> #include "common/common_types.h" @@ -53,7 +54,7 @@ namespace Common::Compression { * * @return the decompressed data. */ -[[nodiscard]] std::vector<u8> DecompressDataLZ4(const std::vector<u8>& compressed, +[[nodiscard]] std::vector<u8> DecompressDataLZ4(std::span<const u8> compressed, std::size_t uncompressed_size); -} // namespace Common::Compression
\ No newline at end of file +} // namespace Common::Compression |