about summary refs log tree commit diff
path: root/unpacker/src/main.rs
diff options
context:
space:
mode:
authorgennyble <gen@nyble.dev>2023-06-09 02:58:52 -0500
committergennyble <gen@nyble.dev>2023-06-09 02:58:52 -0500
commitec6b1351c8cc5720ee4818c42220626175e4df82 (patch)
tree477b66ea28fdf098f52f19bca09f04e53c27314c /unpacker/src/main.rs
parentb08ac436beed955053b672d65715811535a46096 (diff)
downloadlri-rs-ec6b1351c8cc5720ee4818c42220626175e4df82.tar.gz
lri-rs-ec6b1351c8cc5720ee4818c42220626175e4df82.zip
uh
Diffstat (limited to 'unpacker/src/main.rs')
-rw-r--r--unpacker/src/main.rs11
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]);
 	}
 }