Crate tar_parser2
source ·Expand description
A nom-based parser for TAR files. This parser only accepts byte slice and doesn’t deal with IO.
let file = std::fs::read("foo.tar")?;
let (_, entries) = tar_parser2::parse_tar(&file[..])?;
for entry in entries {
println!("{}", entry.header.name);
}
Structs
- GNU ustar extra header.
- POSIX ustar extra header. See
parse_tar
for usage. - Sparse index block.
- A tar entry. Maybe a file, a directory, or some extensions.
- A tar entry extracted using
parse_entry_streaming
. Maybe a file, a directory, or some extensions. - A tar header.
- Ustar header.
Enums
- Extra TAR header.
- Type of entry.
- Extra header of ustar header.
Functions
- Tries to parse the data and extract a tar entry.
- Parse GNU long pathname or linkname.
- Parse PAX properties.
- Parse the whole data as a TAR file, and return all entries.