From ec6b1351c8cc5720ee4818c42220626175e4df82 Mon Sep 17 00:00:00 2001 From: gennyble Date: Fri, 9 Jun 2023 02:58:52 -0500 Subject: uh --- unpacker/src/main.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'unpacker/src/main.rs') diff --git a/unpacker/src/main.rs b/unpacker/src/main.rs index 047b4c5..36d8131 100644 --- a/unpacker/src/main.rs +++ b/unpacker/src/main.rs @@ -13,12 +13,19 @@ fn main() { work_idx: 0, }; + let count = (10.0 as f32 * (10.0 / 8.0)).ceil() as usize; for byte in testdata { up.push(byte); + + if count == up.out.len() { + break; + } + } + if count > up.out.len() { + up.finish(); } - up.finish(); for chnk in up.out.chunks(2) { - println!("{:08b} {:08b}", chnk[0], chnk[1]); + println!("{:02b} {:08b}", chnk[1], chnk[0]); } } -- cgit 1.4.1-3-g733a5