| Crates.io | cdrle |
| lib.rs | cdrle |
| version | 0.1.0 |
| created_at | 2025-09-16 15:54:02.329726+00 |
| updated_at | 2025-09-16 15:54:02.329726+00 |
| description | Calldata RLE: simple, bounded run-length encoding for Ethereum calldata. |
| homepage | |
| repository | https://github.com/Vectorized/cdrle |
| max_upload_size | |
| id | 1841970 |
| size | 7,257 |
Calldata RLE — a simple, bounded run-length encoding specialized for Ethereum calldata.
0x00(0x00, CONTROL) where bit7=0→zeros, bit7=1→0xFF, low7=(len-1)1..=128, 0xFF 1..=32let input = b"\x00\x00\x00\x00*\xff\xff\xff\x01\x02\x03\x00\xff\x00\xaa\xbb\x00\xff";
let compressed = cdrle::compress(input);
let decompressed = cdrle::decompress(&compressed).unwrap();
assert_eq!(input, &decompressed[..]);