Skip to content

Commit

Permalink
FIXUP: Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoric committed Oct 9, 2018
1 parent f314905 commit 6f0afa8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bin/generate_dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ fn main_aux() {
let depth = str::parse(matches.value_of("depth").unwrap())
.expect("Invalid number");

progress!(quiet, "Generating dictionary with lazification {lazification}, depth {depth}",
lazification = lazification,
depth = depth);

// Setup.
let parser = Shift::new();
let mut dictionary = Dictionary::default();
Expand Down Expand Up @@ -220,12 +224,14 @@ fn main_aux() {
.expect("Could not create directory");

let dest_dictionary = dest.join("dict.entropy");
progress!(quiet, "Writing probabilities to {:?}", dest_dictionary);
let file_dictionary = File::create(dest_dictionary)
.unwrap_or_else(|e| panic!("Could not create file: {:?}", e));
bincode::serialize_into(file_dictionary, &dictionary)
.expect("Could not serialize entropy dictionary");

let dest_strings = dest.join("dict.strings");
progress!(quiet, "Writing strings to {:?}", dest_strings);
let file_strings = File::create(dest_strings)
.unwrap_or_else(|e| panic!("Could not create file: {:?}", e));
bincode::serialize_into(file_strings, &files_containing_string)
Expand Down

0 comments on commit 6f0afa8

Please sign in to comment.