Inflate algorithm with a minimum heap usage for rust embedded
Go to file
kirbylife 72aaed1012 Add LICENSE 2022-05-20 05:35:36 +00:00
src Remove useless data 2022-05-20 00:32:43 -05:00
tests add some basic tests 2022-05-20 00:31:43 -05:00
.gitignore add the rule to ignore undo-tree 2022-05-04 23:20:56 -05:00
Cargo.toml Remove useless data 2022-05-20 00:32:43 -05:00
LICENSE Add LICENSE 2022-05-20 05:35:36 +00:00
README.md Add README.md 2022-05-20 00:35:10 -05:00

README.md

Inflate_nostd

Inflate it's an algorithm to uncompress data compressed deflated

This is a very modified version of the image-rs/inflate removing the std dependency and minimizing Heap usage (although the usage was reduced quite a lot, I have not managed to make it 100% stack).

WARNING!!

This crate use unsafe code. In particular I use some buffers stored in static mut and cause conflict when you try to use this crate in multithread. If you want to uncompress data in multithread use the image-rs/inflate crate.

Usage

use inflate_nostd::inflate_bytes;

let encoded = [203, 72, 205, 201, 201, 87, 40, 207, 47, 202, 73, 1, 0];
let decoded = inflate_bytes(&encoded[..]).unwrap();
println!("{}", core::str::from_utf8(&decoded).unwrap());

License

The code from image-rs/inflate is under the license MIT License and this another crate it's heavy inspired on that, so, this code is released under the MIT license.