Rust crates for ZIP structures (zip_structs)
This crates handles structures in ZIP files.
- End of central directory (EOCD) structure
- Central directory structure
- Local file header structure
- Data descriptor structure
Installation
Add the following line to [dependencies]
in your Cargo.toml
.
= "^0.2"
Breaking changes to the API are planned for the future. Therefore, it is strongly recommended to use this versioning format.
Basic usage of parsing from the EOCD sturcture of a ZIP archive
use BufReader;
use File;
use decode_string_complete_table;
use DECODING_TABLE_CP437;
use ZipCDEntry;
use ZipEOCD;
use ZipLocalFileHeader;
let mut zip_file = BufReader;
let eocd = from_reader?;
let cd_list = all_from_eocd?;
// Show file names in the ZIP archive
for cd in &cd_list
Competing libraries
There are some libraries providing more abstract and higher-level APIs.
zip
rc-zip
These libraries do not handle general purpose bit flags in central directories and local file headers. rc-zip
cannot handle file names encoded in other than UTF-8.
vfs-zip
This library provides virtual file system, not structures in ZIP archives.
Support of ZIP64
This library has not supported ZIP64 yet.
License
MIT