aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-03-05 11:27:54 +0100
committerGitHub Enterprise <[email protected]>2025-03-05 11:27:54 +0100
commit4b981aed0281ac995c326e3d03dc482353f66405 (patch)
tree3441f33899708c3b2a7a8cf42f393ecfe17bb22b /src/zencore/include
parentdo direct update of stats numbers (#294) (diff)
downloadzen-4b981aed0281ac995c326e3d03dc482353f66405.tar.xz
zen-4b981aed0281ac995c326e3d03dc482353f66405.zip
streaming compress (#295)
- Improvement: Validate hash of decompressed data inline with streaming decompression - Improvement: Do streaming compression of large blobs to improve memory and I/O performance
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/compress.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/compress.h b/src/zencore/include/zencore/compress.h
index c056d7561..3969e9dbd 100644
--- a/src/zencore/include/zencore/compress.h
+++ b/src/zencore/include/zencore/compress.h
@@ -74,6 +74,11 @@ public:
OodleCompressor Compressor = OodleCompressor::Mermaid,
OodleCompressionLevel CompressionLevel = OodleCompressionLevel::VeryFast,
uint64_t BlockSize = 0);
+ [[nodiscard]] ZENCORE_API static bool CompressToStream(const CompositeBuffer& RawData,
+ std::function<void(uint64_t Offset, const CompositeBuffer& Range)>&& Callback,
+ OodleCompressor Compressor = OodleCompressor::Mermaid,
+ OodleCompressionLevel CompressionLevel = OodleCompressionLevel::VeryFast,
+ uint64_t BlockSize = 0);
/**
* Construct from a compressed buffer previously created by Compress().