Mercurial > touhou
comparison utils/src/lzss.rs @ 758:daa23a4ff24d
utils: Replace custom SeekableSlice struct with std::io::Cursor.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 05 Jan 2021 04:11:18 +0100 |
parents | 21b186be2590 |
children |
comparison
equal
deleted
inserted
replaced
757:21b186be2590 | 758:daa23a4ff24d |
---|---|
42 } | 42 } |
43 | 43 |
44 #[cfg(test)] | 44 #[cfg(test)] |
45 mod tests { | 45 mod tests { |
46 use super::*; | 46 use super::*; |
47 use crate::util::SeekableSlice; | 47 use std::io::Cursor; |
48 | 48 |
49 #[test] | 49 #[test] |
50 #[ignore] | 50 #[ignore] |
51 fn bit_by_bit() { | 51 fn bit_by_bit() { |
52 // TODO: find actual lzss data. | 52 // TODO: find actual lzss data. |
53 let data = SeekableSlice::new(&[0, 0, 0]); | 53 let data = Cursor::new(vec![0, 0, 0]); |
54 let mut bitstream = BitStream::new(data); | 54 let mut bitstream = BitStream::new(data); |
55 decompress(&mut bitstream, 3, 0x2000, 13, 4, 3).unwrap(); | 55 decompress(&mut bitstream, 3, 0x2000, 13, 4, 3).unwrap(); |
56 } | 56 } |
57 } | 57 } |