archivelib 0.1.1

An implementaton of the Greenleaf ArchiveLib compression/decompression algorithm
Documentation
use crate::compress::RCompressData;
use crate::support::ExactCallWriter;

#[test]
pub fn test_embroidermodder_hus_stitch_attrs() {
  use crate::test::fixed::real_world::embroidermodder_hus::stitch_attrs::get_uncompressed;
  let input = get_uncompressed();
  let output = ExactCallWriter::from_vec(vec![
    (24, 16),
    (8, 5),
    (0, 3),
    (3, 3),
    (2, 3),
    (0, 2),
    (3, 3),
    (0, 3),
    (3, 3),
    (3, 3),
    (2, 3),
    (511, 9),
    (0, 2),
    (108, 9),
    (7, 3),
    (6, 3),
    (4, 3),
    (3, 4),
    (6, 3),
    (4, 3),
    (4, 4),
    (1, 2),
    (0, 2),
    (94, 9),
    (1, 2),
    (1, 2),
    (0, 2),
    (50, 9),
    (7, 3),
    (0, 2),
    (157, 9),
    (5, 3),
    (1, 2),
    (0, 5),
    (0, 5),
    (5, 3),
    (4, 3),
    (29, 5),
    (0, 0),
    (12, 4),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (0, 1),
    (0, 0),
    (13, 4),
    (0, 0),
    (5, 3),
    (4, 3),
    (30, 5),
    (0, 0),
    (12, 4),
    (28, 5),
    (31, 5),
    (0, 0),
    (0, 7),
  ]);
  let mut cd = RCompressData::new(&input[..], output, input.len(), 10, true).unwrap();
  cd.compress().unwrap();
  cd.into_writer().assert_drained();
}