5 unstable releases

0.9.1 Mar 18, 2023
0.9.0 Mar 9, 2023
0.8.0 Mar 5, 2023
0.7.1 Feb 21, 2023
0.7.0 Jan 29, 2023

#36 in #tar-archive

Download history 1348/week @ 2024-08-31 1155/week @ 2024-09-07 975/week @ 2024-09-14 722/week @ 2024-09-21 1002/week @ 2024-09-28 991/week @ 2024-10-05 1135/week @ 2024-10-12 1350/week @ 2024-10-19 1226/week @ 2024-10-26 794/week @ 2024-11-02 694/week @ 2024-11-09 611/week @ 2024-11-16 173/week @ 2024-11-23 638/week @ 2024-11-30 393/week @ 2024-12-07 22/week @ 2024-12-14

1,330 downloads per month
Used in 3 crates (via vfs-tar)

MIT license

23KB
449 lines

tar-parser

Implementation of a tar archive parser written in rust using nom.

let file = std::fs::read("foo.tar")?;
let (_, entries) = tar_parser2::parse_tar(&file[..])?;
for entry in entries {
    println!("{}", entry.header.name);
}

For more robust example of listing TAR contents, see example ls.


lib.rs:

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);
}

Dependencies

~1MB
~18K SLoC