diff options
Diffstat (limited to 'unpacker/src/main.rs')
-rw-r--r-- | unpacker/src/main.rs | 11 |
1 files changed, 9 insertions, 2 deletions
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]); } } |