reduce allocations while reading chunks data

This commit is contained in:
MihailRis 2025-12-06 00:58:13 +03:00
parent 21f7390265
commit 9dc9441902
12 changed files with 93 additions and 43 deletions

View file

@ -3,6 +3,7 @@
#include <memory>
#include "typedefs.hpp"
#include "util/span.hpp"
namespace compression {
enum class Method {
@ -27,4 +28,8 @@ namespace compression {
/// @return decompressed bytes array
std::unique_ptr<ubyte[]> decompress(
const ubyte* src, size_t srclen, size_t dstlen, Method method);
void decompress(
const util::span<ubyte> src, ubyte* dst, size_t dstlen, Method method
);
}