async-compression icon indicating copy to clipboard operation
async-compression copied to clipboard

Decoder auto-detection

Open Turbo87 opened this issue 1 year ago • 1 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.

Turbo87 avatar Jan 24 '24 18:01 Turbo87

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?

NobodyXu avatar Jan 25 '24 14:01 NobodyXu