Skip to content

Commit

Permalink
Added LTO.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Sep 23, 2016
1 parent 4286490 commit 81b6a5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ rustc-serialize = "^0.3"
[dev-dependencies]
rand = "^0.3"
walkdir = "^0.1"

[profile.release]
lto = true
4 changes: 2 additions & 2 deletions src/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub fn decrypt_archive(filename: &str, output: Option<String>, no_confirm: bool)
path.into_os_string().into_string().unwrap()
});

let override_file = no_confirm || ask_override_file(&Path::new(&output));
let override_file = no_confirm || ask_override_file(Path::new(&output));

if override_file {
let password = ask_password();
Expand Down Expand Up @@ -124,7 +124,7 @@ pub fn extract(filename: &str, output_dir: &str, no_confirm: bool) -> Result<(),

if override_file {
try!(init_output(&file_list, output_dir));
// TODO: continue after the file list.
// TODO: do not parse again the file list.
unwrap_or_error!(extract_files(bytes, output_dir))
}

Expand Down
2 changes: 0 additions & 2 deletions src/cbv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ fn decompress_block(input: Vec<u8>) -> Vec<u8> {
for _ in 0 .. 16 {
let coded = (code_bytes & 0x8000) != 0;
if coded {
// TODO: write a wrapper to a slice where the Index operator uses get_unchecked() in
// release and [] in debug.
let current_byte = input[0] as usize;
let high = current_byte >> 4;
let low = current_byte & 0xF;
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
*/

/*
* TODO: Use 2 levels of parser. The second level receive a Write parameter.
* TODO: Create macros to keep a state within a parser.
* TODO: Use Buf{Reader|Writer} whenever possible.
* TODO: Use Vec::with_capacity() in the crates des, huffman and uncbv.
* TODO: This software consumes too much memory (because of mmaping the file).
* TODO: Better error handling.
* TODO: Decompress the files concurrently.
Expand Down

0 comments on commit 81b6a5d

Please sign in to comment.