Brotlic - A simpler rust-brotli alternative

58 points hl3mukkel

I was doing a comparison of compression algorithms and found brotli to have the best compression ratio. I searched crates.io and found some implementations, however I noticed that they lacked documentation. I was overwhelmed and confused and I discovered the official brotli repository, which was greatly documented. So I decided to write my first (sys-)crate brotlic: https://crates.io/crates/brotlic

And of course I documented 100% of it! I followed the Rust api guidelines and took inspiration from the standard library in order to make the library as easy to use as possible. I'd love to have some feedback on it on what I could improve. The repo also contains tests, documentation and benchmarks to compare the performance to rust-brotli, which was comparable on my machine.

I would like to add custom memory allocator support in the future, but sadly they're still experimental so I'll wait until they're stable first before implementing it, I already have a good idea on how to do it though.

The crate has not reached 1.0 yet, so if anyone has some opinions on the API being flawed in some way, please let me know! I'd like to improve my skills in becoming a rust library author. Thanks in advance.