Skip to main content

input_progress_len

Function input_progress_len 

Source
pub fn input_progress_len(path: &Path) -> u64
Expand description

Total number of bytes the progress callback installed by open_input_with_progress can report for path — i.e. the correct length for a progress bar over this input.

For most inputs this is simply the on-disk file size (progress counts raw/compressed bytes read from disk). Zip archives are the exception: only the sole .sql member’s compressed bytes are ever streamed, so the total is that member’s compressed size — sizing a bar with the archive’s file size would leave it stuck below 100% by the archive overhead and any sibling members. Falls back to the file size when the member can’t be located (the subsequent open reports the real error).