···55use std::io::{Read, Write};
66use std::path::Path;
7788-/// The standard extension for the gzip format.
99-pub const EXT: &str = "gz";
1010-118pub struct Gzip {
129 pub compression_level: u32,
1310 pub common_args: CmprssCommonArgs,
+1-1
src/main.rs
···160160 "error: input appears to already be a {} archive, exiting. Use '--compress' if needed.", compressor.name()
161161 )
162162 } else {
163163- let out = output_filename(input_path, &args.output, gzip::EXT);
163163+ let out = output_filename(input_path, &args.output, compressor.extension());
164164 compressor.compress(File::open(input_path).unwrap(), File::create(out).unwrap());
165165 }
166166 }