(data: &[u8])
| 12 | use std::{env, fs::File}; |
| 13 | |
| 14 | fn encode_hex(data: &[u8]) -> String { |
| 15 | let mut res = String::with_capacity(2 * data.len()); |
| 16 | for &byte in data { |
| 17 | res.push_str(&format!("{byte:02X}")); |
| 18 | } |
| 19 | res |
| 20 | } |
| 21 | |
| 22 | fn decode<R: BufRead, W: Write>(mut reader: R, mut writer: W) -> io::Result<usize> { |
| 23 | let mut data = Vec::new(); |