diff --git a/fa-compression/src/main.rs b/fa-compression/src/main.rs index 24bf65f..7bbfa2b 100644 --- a/fa-compression/src/main.rs +++ b/fa-compression/src/main.rs @@ -1,5 +1,7 @@ use std::io::{stdin, stdout, BufRead, BufReader, BufWriter, Write}; +use fa_compression::algorithm1::encode; + pub fn main() { let stdin = stdin(); let stdout = stdout(); @@ -12,6 +14,8 @@ pub fn main() { let line = line.unwrap(); let splitted_line = line.split("\t").collect::>(); - writer.write_all(format!("{}\t{}\t{}\t{}\n", splitted_line[1], splitted_line[3], splitted_line[6], splitted_line[7]).as_bytes()).unwrap(); + writer.write_all(format!("{}\t{}\t{}\t", splitted_line[1], splitted_line[3], splitted_line[6]).as_bytes()).unwrap(); + writer.write_all(encode(splitted_line[7]).as_slice()).unwrap(); + writer.write_all(b"\n").unwrap(); } }