aboutsummaryrefslogtreecommitdiff
path: root/lvc/src/huff.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lvc/src/huff.rs')
-rw-r--r--lvc/src/huff.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/lvc/src/huff.rs b/lvc/src/huff.rs
index b00aaa0..6d74c42 100644
--- a/lvc/src/huff.rs
+++ b/lvc/src/huff.rs
@@ -22,6 +22,7 @@ pub fn write_huff(buf: &[u8], w: &mut impl Write) -> Result<usize> {
tree.create_lut(&mut table, 1);
tree.write(&mut w)?;
+
for b in buf {
let mut k = table[*b as usize];
while k != 1 {
@@ -31,7 +32,6 @@ pub fn write_huff(buf: &[u8], w: &mut impl Write) -> Result<usize> {
}
w.flush()?;
- eprintln!("{}", w.position);
Ok(w.position)
}
@@ -43,9 +43,7 @@ pub fn read_huff(r: &mut impl Read, buf: &mut Vec<u8>) -> Result<usize> {
len |= (r.rbyte()? as usize) << 8;
len |= (r.rbyte()? as usize) << 16;
- eprintln!("len={len:?}");
let root = HT::read(&mut r)?;
- // eprintln!("{root:?}");
let root = match &root {
HT::Branch(a, b) => [a, b],
_ => panic!("no!"),
@@ -64,8 +62,6 @@ pub fn read_huff(r: &mut impl Read, buf: &mut Vec<u8>) -> Result<usize> {
}
}
}
- eprintln!("len(buf)={}", buf.len());
- eprintln!("{}", r.position);
Ok(r.position)
}