From 738e245fb3403a425d658ce11204210ea83cacdc Mon Sep 17 00:00:00 2001 From: Per Larsson Date: Wed, 13 Oct 2021 11:41:18 +0200 Subject: Added support for decompressing from offset. --- zencore/include/zencore/compress.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zencore/include') diff --git a/zencore/include/zencore/compress.h b/zencore/include/zencore/compress.h index 6a65071d3..426b4981a 100644 --- a/zencore/include/zencore/compress.h +++ b/zencore/include/zencore/compress.h @@ -118,16 +118,16 @@ public: OodleCompressionLevel& OutCompressionLevel) const; /** - * Decompress into a memory view that is exactly GetRawSize() bytes. + * Decompress into a memory view that is less or equal GetRawSize() bytes. */ - [[nodiscard]] ZENCORE_API bool TryDecompressTo(MutableMemoryView RawView) const; + [[nodiscard]] ZENCORE_API bool TryDecompressTo(MutableMemoryView RawView, uint64_t RawOffset = 0) const; /** * Decompress into an owned buffer. * * @return An owned buffer containing the raw data, or null on error. */ - [[nodiscard]] ZENCORE_API SharedBuffer Decompress() const; + [[nodiscard]] ZENCORE_API SharedBuffer Decompress(uint64_t RawOffset = 0, uint64_t RawSize = ~uint64_t(0)) const; /** * Decompress into an owned composite buffer. -- cgit v1.2.3