Skip to content

Way to know how many compressed bytes were read when decompressing #85

@alexgagnon

Description

@alexgagnon

This is more for user feedback than anything, but I was looking for a way to know how many bytes of the compressed source had been read, rather than the number of decompressed bytes, so that I can get accurate ETA's.

For example:

let input = File::open(input.expect("Could not get path"))?;
let size = input.metadata()?.len();
let reader = BufReader::new(input);
let mut md = MultiBzDecoder::new(reader);
let mut buffer = [0; BUFFER_LENGTH];
let mut n = md.read(&mut buffer)?;

n appears to me to be how many uncompressed bytes were read, How do I know how far along in the file I've read and how it compares to size?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions