summaryrefslogtreecommitdiff
path: root/src/common/lz4_compression.h
diff options
context:
space:
mode:
authorGravatar Lioncash2021-05-24 05:28:45 -0400
committerGravatar Lioncash2021-05-24 15:00:59 -0400
commit00213377b1b09fadce55cc3e3562adb5c4d1e1c4 (patch)
treeb5a8416fe37c9c78bfb2be53284ce8012df09014 /src/common/lz4_compression.h
parentMerge pull request #6248 from A-w-x/intelmesa (diff)
downloadyuzu-00213377b1b09fadce55cc3e3562adb5c4d1e1c4.tar.gz
yuzu-00213377b1b09fadce55cc3e3562adb5c4d1e1c4.tar.xz
yuzu-00213377b1b09fadce55cc3e3562adb5c4d1e1c4.zip
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.h5
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 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <span>
7#include <vector> 8#include <vector>
8 9
9#include "common/common_types.h" 10#include "common/common_types.h"
@@ -53,7 +54,7 @@ namespace Common::Compression {
53 * 54 *
54 * @return the decompressed data. 55 * @return the decompressed data.
55 */ 56 */
56[[nodiscard]] std::vector<u8> DecompressDataLZ4(const std::vector<u8>& compressed, 57[[nodiscard]] std::vector<u8> DecompressDataLZ4(std::span<const u8> compressed,
57 std::size_t uncompressed_size); 58 std::size_t uncompressed_size);
58 59
59} // namespace Common::Compression \ No newline at end of file 60} // namespace Common::Compression