diff options
author | gennyble <gen@nyble.dev> | 2023-09-10 02:44:01 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2023-09-10 02:44:01 -0500 |
commit | a962ba9c853a797e9a41b2830ec0181b167d8cd9 (patch) | |
tree | 7de53dfcaf87c5d4b43f2e8b38161eb193c136ad /unpacker/src/main.rs | |
parent | 70187683361d97a8b5a251567323c323c90302f2 (diff) | |
download | lri-rs-a962ba9c853a797e9a41b2830ec0181b167d8cd9.tar.gz lri-rs-a962ba9c853a797e9a41b2830ec0181b167d8cd9.zip |
reorg
Diffstat (limited to 'unpacker/src/main.rs')
-rw-r--r-- | unpacker/src/main.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/unpacker/src/main.rs b/unpacker/src/main.rs deleted file mode 100644 index 36d8131..0000000 --- a/unpacker/src/main.rs +++ /dev/null @@ -1,31 +0,0 @@ -use unpacker::Unpacker; - -fn main() { - // Four bits padding at the end. - let testdata = vec![ - 0b10000000, 0b00010000, 0b00000010, 0b00000000, 0b01000000, 0b00001000, 0b00000001, - 0b00000000, 0b00100000, 0b00000100, 0b00000000, 0b10000000, 0b00010000, - ]; - - let mut up = Unpacker { - out: vec![], - work: 0, - 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(); - } - - for chnk in up.out.chunks(2) { - println!("{:02b} {:08b}", chnk[1], chnk[0]); - } -} |