Expand description
Decompress data in zx0 format.
§Examples
Decompress from file into a Vec<u8>:
let filename = "something.zx0";
let mut source = std::fs::File::open(filename)?;
let content = zx0decompress::decompress(&mut source)?;Decompress from a byte slice into a Vec<u8>:
let source = [
0x1fu8, 0x41, 0x42, 0x52, 0x41, 0x20, 0xf6, 0xab, 0x43, 0x44, 0xf5, 0xf2, 0x55, 0x58,
];
let result = zx0decompress::decompress(&mut source.as_ref()).unwrap();
assert_eq!(&result, b"ABRA ABRACADABRA");Structs§
- Settings
- Decompression settings
Enums§
- Decompress
Error - An error that occured during decompression.
Functions§
- decompress
- Decompress data using the default settings.
Reads data from the supplied
sourcewhich isReadand return it as aVec. Any failures to read fromsourcewill be returned. - decompress_
with_ settings - Decompress data using the given settings.
Reads data from the supplied
sourcewhich isReadand return it as aVec. Any failures to read fromsourcewill be returned.