Skip to content

Commit

Permalink
feat!: Introduce ReadZipStreaming trait (#62)
Browse files Browse the repository at this point in the history
This renames/simplifies several traits and structs to be simpler. The trait and struct names are now consistent between `rc-zip-sync` and `rc-zip-tokio`, and they both have a new `ReadZipStreaming` trait with a `stream_zip_entries_throwing_caution_to_the_wind` method.

This method relies on local file headers rather than central directory headers to perform decompression. It returns a `StreamingEntryReader`, which implements `Read` / `AsyncRead` respectively. Once the entry is fully read, moving on to the next entry can be done by calling `finish()`.

More bugs have been found and more tests have been added, including for the streaming interface.
  • Loading branch information
fasterthanlime authored Feb 5, 2024
1 parent c95749b commit ac46ad8
Show file tree
Hide file tree
Showing 43 changed files with 1,750 additions and 2,947 deletions.
59 changes: 59 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _default:
check:
cargo hack clippy --each-feature

docs:
doc:
RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps

# Run all tests locally
Expand Down
1 change: 1 addition & 0 deletions rc-zip-sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ positioned-io = { version = "0.3.3", optional = true }
rc-zip = { version = "3.0.0", path = "../rc-zip" }
oval = "2.0.0"
tracing = "0.1.40"
winnow = "0.5.36"

[features]
default = ["file", "deflate"]
Expand Down
Loading

0 comments on commit ac46ad8

Please sign in to comment.