Nullus157 / async-compression

Adaptors between compression crates and Rust's async IO types

Home Page:https://docs.rs/async-compression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decoder auto-detection

Turbo87 opened this issue · comments

I have a use-case where I don't know the compression of a file up-front. It would be nice if there was a way to use this crate to figure out the compression algorithm based on the magic number at the beginning of the compressed file.

A PR is welcomed, I am aware of crates doing such thing (IIRC it's called file-format, it has many breaking releases due to the enum), but just not sure whether it can be trusted for such use case.

Maybe we should build a generic one, that enables user to plug in their own implementation?