Skip to content

Commit

Permalink
revert some gzip2 work in deflate.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertdev committed Feb 16, 2024
1 parent 4759a39 commit 98994f3
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions zlib-rs/src/deflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2003,19 +2003,11 @@ pub fn deflate(stream: &mut DeflateStream, flush: Flush) -> ReturnCode {

// TODO gzip

if stream.state.wrap == 2 {
todo!()
// let crc_fold = std::mem::take(&mut stream.state.crc_fold);
// stream.adler = crc32_fold_final(crc_fold);
//
// let adler = stream.adler as u32;
// stream.state.pending.extend(&adler.to_le_bytes());
//
// let total_in = stream.total_in as u32;
// stream.state.pending.extend(&total_in.to_le_bytes());
} else if stream.state.wrap == 1 {
let adler = stream.adler as u32;
stream.state.pending.extend(&adler.to_be_bytes());
{
if stream.state.wrap == 1 {
let adler = stream.adler as u32;
stream.state.pending.extend(&adler.to_be_bytes());
}
}

flush_pending(stream);
Expand Down

0 comments on commit 98994f3

Please sign in to comment.