Skip to content

Commit

Permalink
Fix use of wrong internal variable
Browse files Browse the repository at this point in the history
  • Loading branch information
DeflateAwning committed May 25, 2024
1 parent 6acc158 commit f989d54
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/frame/decompress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ impl<R: io::Read> FrameDecoder<R> {
self.r
}

/// Returns the total number of uncompressed bytes read so far
pub fn total_out(&self) -> u64 {
self.content_len
}

fn read_frame_info(&mut self) -> Result<usize, io::Error> {
let mut buffer = [0u8; MAX_FRAME_INFO_SIZE];

Expand Down Expand Up @@ -347,12 +352,6 @@ impl<R: io::Read> FrameDecoder<R> {
}
self.read_block()
}

/// Returns the total number of uncompressed bytes read so far
pub fn total_out(&self) -> usize {
// TODO: confirm if self.dst_start or self.ext_dict_offset is the correct one here
self.dst_start
}
}

impl<R: io::Read> io::Read for FrameDecoder<R> {
Expand Down

0 comments on commit f989d54

Please sign in to comment.