use-archive-format 0.1.0

Archive and compression format labels for RustUse
Documentation
  • Coverage
  • 100%
    41 out of 41 items documented1 out of 20 items with examples
  • Size
  • Source code size: 18.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 596.13 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-archive
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-archive-format

Archive and compression format labels plus filename/extension detection.

This crate is part of the use-archive facade workspace. It detects common archive filename encodings such as .zip, .tar.gz, .tgz, .tar.xz, .tar.zst, .cpio.gz, .7z.001, .part1.rar, .warc.gz, and .mtree.gz. It does not inspect bytes, parse archive headers, extract files, or compress data.

Example

use use_archive_format::{ArchiveEncoding, ArchiveFormat, CompressionFormat};

let encoding = ArchiveEncoding::from_extension("release.tar.zst");

assert_eq!(encoding.archive, ArchiveFormat::Tar);
assert_eq!(encoding.compression, CompressionFormat::Zstd);