diff options
author | gennyble <gen@nyble.dev> | 2023-06-09 02:58:52 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2023-06-09 02:58:52 -0500 |
commit | ec6b1351c8cc5720ee4818c42220626175e4df82 (patch) | |
tree | 477b66ea28fdf098f52f19bca09f04e53c27314c /unpacker/src/main.rs | |
parent | b08ac436beed955053b672d65715811535a46096 (diff) | |
download | lri-rs-ec6b1351c8cc5720ee4818c42220626175e4df82.tar.gz lri-rs-ec6b1351c8cc5720ee4818c42220626175e4df82.zip |
uh
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]); } } |