Removed ChunkInfo and added additional functions on decoder

This commit is contained in:
Alan Race committed 2022-07-18 17:15:44 +02:00
1 parent 5cadbffebf
commit 802949f6e1
7 files changed
+69 -108

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ impl Compression for Deflate {
impl CompressionAlgorithm for Deflate {
fn write_to<W: Write>(&mut self, writer: &mut W, bytes: &[u8]) -> Result<u64, io::Error> {
let mut encoder = ZlibEncoder::new(writer, self.level);
encoder.write_all(&bytes)?;
encoder.write_all(bytes)?;
encoder.try_finish()?;
Ok(encoder.total_out())
}