From f61fedcc2baa833d8eee7eb4c7b5f6aab1da2201 Mon Sep 17 00:00:00 2001 From: Moritz Borcherding Date: Sat, 21 Dec 2024 20:41:48 +0100 Subject: [PATCH] update doc on FrameCompressor::compress --- src/encoding/frame_compressor.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/encoding/frame_compressor.rs b/src/encoding/frame_compressor.rs index db8bd9c..9e42ced 100644 --- a/src/encoding/frame_compressor.rs +++ b/src/encoding/frame_compressor.rs @@ -117,7 +117,10 @@ impl FrameCompressor { compression_level } - /// Compress the uncompressed data into a valid Zstd frame and write it into the provided buffer + /// Compress the uncompressed data from the provided source as one Zstd frame and write it to the provided drain + /// + /// This will repeatedly call [Read::read] on the source to fill up blocks until the source returns 0 on the read call. + /// Also [Write::write_all] will be called on the drain after each block has been encoded. pub fn compress(&mut self) { self.match_generator.reset(self.compression_level); let source = self.uncompressed_data.as_mut().unwrap();