diff --git a/src/frame/decompress.rs b/src/frame/decompress.rs index d6bb052..e630c07 100644 --- a/src/frame/decompress.rs +++ b/src/frame/decompress.rs @@ -106,6 +106,11 @@ impl FrameDecoder { 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 { let mut buffer = [0u8; MAX_FRAME_INFO_SIZE]; @@ -347,12 +352,6 @@ impl FrameDecoder { } 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 io::Read for FrameDecoder {