Skip to content

Commit

Permalink
prefer speed by default & doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderHarrison committed Aug 29, 2024
1 parent 2ead550 commit ccfa5eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ impl Options {
compress: None,
recursive: false,
threading: true,
level: 6,
level: 3,
log: true,
};
}
Expand Down
16 changes: 13 additions & 3 deletions src/slpz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const HELP: &'static str =
"Usage: slpz [OPTIONS] <input path>
Options:
--fast Prefer speed over compression
--small Prefer compression over speed [Default]
--fast Prefer speed over compression [Default]
--small Prefer compression over speed
-x, --compress
-d, --decompress
-r, --recursive Compress/decompress all files in subdirectories.
Expand Down Expand Up @@ -37,6 +37,16 @@ fn main() {
// last arg is path
let input_path = unwrap_option!(arg_strings.pop());

if &input_path == "-h" || &input_path == "--help" {
println!("{}", HELP);
std::process::exit(0);
}

if &input_path == "-v" || &input_path == "--version" {
println!("slpz version {} - created by Alex Harrison (Aitch)", VERSION);
std::process::exit(0);
}

let mut i = 0;
loop {
let a = match arg_strings.get(i) { Some(a) => a, None => break, };
Expand All @@ -55,7 +65,7 @@ fn main() {
std::process::exit(0);
}
"-v" | "--version" => {
println!("slpz version {}", VERSION);
println!("slpz version {} - created by Alex Harrison (Aitch)", VERSION);
std::process::exit(0);
}
a => eprintln!("unknown argument '{}'", a),
Expand Down

0 comments on commit ccfa5eb

Please sign in to comment.