Skip to content

Commit

Permalink
add encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
tibvdm committed Apr 15, 2024
1 parent ad01004 commit b1a5110
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fa-compression/src/main.rs
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -12,6 +14,8 @@ pub fn main() {
let line = line.unwrap();
let splitted_line = line.split("\t").collect::<Vec<&str>>();

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();
}
}

0 comments on commit b1a5110

Please sign in to comment.