use devker::prelude::{zlib_decode, zlib_encode, BlockType, Cache};
let mut cache = Cache::new();
let v = String::from("Hello world, this is a wonderful world !");
let v_in = v.into_bytes();
let encoded = zlib_encode(&v_in, BlockType::Fixed, &mut cache);
let decoded = zlib_decode(&encoded, &mut cache).unwrap();
assert_eq!(v_in, decoded);
use devker::prelude::{zlib_decode, zlib_encode, BlockType, Cache};
let mut cache = Cache::new();
let v = String::from("Hello world, this is a wonderful world !");
let v_in = v.into_bytes();
let encoded = zlib_encode(&v_in, BlockType::Fixed, &mut cache);
let decoded = zlib_decode(&encoded, &mut cache).unwrap();
assert_eq!(v_in, decoded);
let v = String::from("The cache can be reused !");
let v_in = v.into_bytes();
let encoded = zlib_encode(&v_in, BlockType::Fixed, &mut cache);
let decoded = zlib_decode(&encoded, &mut cache).unwrap();
assert_eq!(v_in, decoded);