I’m looking to build something in Rust that requires being able to extract a variety of archive and compressed file formats, like various forms of compressed tar files, zip files, iso files, etc. The 7zip software suite is really good at both auto-detecting what format it’s in and extracting almost anything you throw at it (it even dumps out the objects in Linux, Mac and Windows executables).

I was originally just thinking of including 7zip as a dependency and calling its command line tool from Rust so I can get it to do all the work, but is there a Rust library that is similarly versatile that I can use instead, or is 7zip actually my best option?

  • @BitSound
    link
    4
    edit-2
    9 months ago

    This looks like a good library/tool: https://crates.io/crates/xcompress

    XCompress is a free file archiver utility on Linux, providing multi-format archiving to and extracting from ZIP, Z, GZIP, BZIP2, LZ, XZ, LZMA, 7ZIP, TAR, RAR and ZSTD.