A zip file analyzer
Install Rust as described here, then build the project using:
cargo build --release
Optionally, you can enable traces when building to print additional debug information:
cargo build --release --features tracing
Once the project is built, you can run the ziplinter by giving it a path to a zip file:
./target/release/ziplinter ./testdata/test.zip
Ziplinter will then read the zip to gather metadata, which is then printed to standard output in JSON format. The JSON format contains the following properties:
comment
: the top level archive commentcontents
: the metadata for the files in zip, both from the central directory and from the local file headersencoding
: the text encoding used, e.g.Utf8
eocd
: the end of central directory information, which is used to locate the central directorysize
: the size of the zip file in bytesparsed_ranges
: a list of the ranges within the zip file that were parsed
See the snapshots folder for examples of the JSON output for the various test zips from the testdata
directory.
The internals heavily rely on rc-zip. We'd use it as a dependency, but need access to some internals that don't make much sense for a general audience. So, this is basically a fork that exposes more things.
This project is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.