Cleanup and fix compress/decompress command

This commit is contained in:
topjohnwu
2025-08-23 20:31:15 -07:00
committed by John Wu
parent c1491b8d2b
commit 7b706bb0cb
5 changed files with 94 additions and 83 deletions
+6 -6
View File
@@ -49,12 +49,12 @@ impl FileFormat {
impl FileFormat {
pub fn ext(&self) -> &'static str {
match *self {
Self::GZIP | Self::ZOPFLI => ".gz",
Self::LZOP => ".lzo",
Self::XZ => ".xz",
Self::LZMA => ".lzma",
Self::BZIP2 => ".bz2",
Self::LZ4 | Self::LZ4_LEGACY | Self::LZ4_LG => ".lz4",
Self::GZIP | Self::ZOPFLI => "gz",
Self::LZOP => "lzo",
Self::XZ => "xz",
Self::LZMA => "lzma",
Self::BZIP2 => "bz2",
Self::LZ4 | Self::LZ4_LEGACY | Self::LZ4_LG => "lz4",
_ => "",
}
}