Skip to content

Commit

Permalink
update doc on FrameCompressor::compress
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingSpark committed Dec 21, 2024
1 parent 45cbf30 commit f61fedc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/encoding/frame_compressor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ impl<R: Read, W: Write, M: Matcher> FrameCompressor<R, W, M> {
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();
Expand Down

0 comments on commit f61fedc

Please sign in to comment.