3 releases (breaking)
new 0.3.1 | Jan 22, 2025 |
---|---|
0.2.0 | Jan 10, 2025 |
0.1.0 | Sep 18, 2024 |
#130 in Magic Beans
289 downloads per month
340KB
800 lines
scale-compressed
Crate to compress SCALE encoded data.
This crate is useful for compressing data that is sent over the network.
Example
use scale_compressed::ScaleCompressed;
use parity_scale_codec::{Encode, Decode};
let compressed = ScaleCompressed::new(vec![1u8, 2, 3, 4, 5]);
let encoded = compressed.encode();
let decoded = ScaleCompressed::<Vec<u8>>::decode(&mut &encoded[..]).unwrap();
assert_eq!(vec![1, 2, 3, 4, 5], decoded.0);
License: GPL-3.0 OR Apache-2.0
Dependencies
~95–135MB
~2.5M SLoC