Use hubtools function to get file metadata without extraction#702
Open
mkeeter wants to merge 2 commits into
Open
Use hubtools function to get file metadata without extraction#702mkeeter wants to merge 2 commits into
hubtools function to get file metadata without extraction#702mkeeter wants to merge 2 commits into
Conversation
611519b to
83c0786
Compare
83c0786 to
5b5ed1e
Compare
jamesmunns
approved these changes
Jun 18, 2026
jamesmunns
left a comment
There was a problem hiding this comment.
Looks reasonable to me! One note, but it's a complaint about zip's API, not anything you did.
| for i in 0..archive.len() { | ||
| let file = archive.by_index(i)?; | ||
| println!("{:12} {}", file.size(), file.name()); | ||
| for i in 0..archive.file_count()? { |
There was a problem hiding this comment.
It seems like we might want a file iterator for this, not sure if this is something we do or if it's a dependency thing yet, will check.
edit: nope, it's a zip::ZipArchive thing, and doing it by index is actually how they recommend doing it in their example. Boo.
evan-oxide
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
oxidecomputer/hubtools#65 allows us to get file metadata without extracting the file.
When loading the archive, this can be significant (because the auxiliary flash image is chunky). On my machine, this yields a 16% improvement in test suite runtime (
cargo test --release): from 31.4s to 26.1s.It also lets us hide the
zipinternals inhumility extract.