In-memory compressed String
If your application keeps many long strings in RAM, you can reduce its memory usage by compressing the strings.
Optionally, if with_serde
feature is enabled, it can also be used to serialize and deserialize strings in binary formats in an already-compressed form.
use ComprString;
let raw = "It uses the deflate algorithm, which has a small header overhead, \
so it's suitable even for short-ish strings";
let compr = new;
assert_eq!;
assert_eq!;
println!;
let string = compr.to_string;