Sha256: bd55c00ad6b937422ebd1a20bd91c46886630f3ff5722008e2eee18bbff2528a
Contents?: true
Size: 446 Bytes
Versions: 13
Compression:
Stored size: 446 Bytes
Contents
fn main() { let some_content = "Something"; let compression_level = 3; // Compress some text let compressed = zstd::encode_all(some_content.as_bytes(), compression_level).unwrap(); // Now uncompress it let decoded: Vec<u8> = zstd::decode_all(compressed.as_slice()).unwrap(); // Convert it to text let decoded_text = std::str::from_utf8(&decoded).unwrap(); assert_eq!(some_content, decoded_text); }
Version data entries
13 entries across 13 versions & 1 rubygems