#network #utility #io #tool #library

bin+lib partialzip

Download single files from online zip archives or list the content

22 releases (stable)

2.1.2 Aug 29, 2023
2.1.0 Jul 19, 2023
2.0.1 Jun 5, 2023
1.3.0 Nov 25, 2022
0.6.1 Mar 15, 2022

#76 in Compression

Download history 64/week @ 2023-06-10 44/week @ 2023-06-17 30/week @ 2023-06-24 36/week @ 2023-07-01 13/week @ 2023-07-08 37/week @ 2023-07-15 27/week @ 2023-07-22 11/week @ 2023-07-29 15/week @ 2023-08-05 18/week @ 2023-08-12 27/week @ 2023-08-19 81/week @ 2023-08-26 16/week @ 2023-09-02 57/week @ 2023-09-09 12/week @ 2023-09-16 8/week @ 2023-09-23

97 downloads per month
Used in 2 crates

MPL-2.0 license

624 lines


Github Build Status

PartialZip is a rewrite of https://github.com/planetbeing/partial-zip in Rust.

It allows you to download single files from inside online zip archives.

You are welcome to add more zip types and decompression methods and file sources.

How to Use

As a command line tool:

cargo install partialzip
partialzip list http://yoururl/file.ipsw
partialzip download http://yoururl/file.ipsw kernelcache.release.iphone10 kernelcache.release.iphone10

Or from git sources:

cargo build --release
# listing files
./target/release/partialzip list http://yoururl/file.ipsw
# download file
./target/release/partialzip download http://yoururl/file.ipsw filename
# for example for kernelcache:
./target/release/partialzip download http://yoururl/file.ipsw kernelcache.release.iphone10 kernelcache.release.iphone10


docker build -t marcograss/partialzip .
docker run --rm marcograss/partialzip list http://yoururl/file.ipsw
docker run --rm marcograss/partialzip pipe http://yoururl/file.ipsw kernelcache.release.iphone10 > kernelcache.release.iphone10

What is used for

Sometimes zip archives are huge and you just need a couple of files, for example, a kernelcache from an ipsw

./target/release/partialzip download "http://XXXXX/iPhone10,6_11.1.2_15B202_Restore.ipsw" kernelcache.release.iphone10b kernelcache.release.iphone10b

As you can see the time (and traffic) saved is significant.

PartialZip only downloads the required chunks for your file, allowing you to download a few Mb instead of several Gb of the original archive.


One prerequisite to be able to partially download zips from http servers is that the server support the Range Header. In this way you can request specific parts of the archive.

Not all servers support this. You can check if this is supported using the -r flag

cargo run -- -r list http://yoururl/yourfile.zip

How to use as a library

If you want to use partialzip as a library and you want to reduce the binary size, you can choose in your Cargo.toml the flag default-features = false in the partialzip dependency. This will not build the command line of partialzip which is not required to use it as a library, and it will avoid including some unnecessary dependencies and save space.



~500K SLoC