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

factor out `codec` into a separate crate

Open koehlma opened this issue 10 months ago • 4 comments

I would like to use the abstractions provided for the various compression algorithms in the codec module in a synchronous context. Would you be open to factoring out the codec module into a separate crate? I would be glad to work on a corresponding PR.

koehlma avatar Jan 30 '25 17:01 koehlma

I personally think that's a reasonable and willing to accept such PR, cc @robjtede @Nemo157 what's your thoughts on this?

NobodyXu avatar Jan 31 '25 06:01 NobodyXu

That's something I'd thought of doing for a while but never got round to. I was also thinking it'd be good to extract the generic state machine IO impls into a separate crate too, that way it would be possible to implement codec for an unsupported compression algorithm and wrap it in a reader/writer.

Nemo157 avatar Jan 31 '25 10:01 Nemo157

I opened a PR also factoring out the core IO traits as suggested by @Nemo157.

For some reason, the Gzip test with level 0 is failing. However, this also seems to happen with the latest upstream version (on my machine). Any ideas?

koehlma avatar Jan 31 '25 16:01 koehlma

For some reason, the Gzip test with level 0 is failing. However, this also seems to happen with the latest upstream version (on my machine). Any ideas?

Just slim through the PR, not sure about that

NobodyXu avatar Jan 31 '25 18:01 NobodyXu

https://github.com/Nullus157/async-compression/pull/363 -

Just for reasoning on a new branch - I could not use this branch. I had to start over. The only thing I reused, was the name of the crates. I can resume discussion in the PR

jkushmaul avatar Aug 14 '25 01:08 jkushmaul

https://crates.io/crates/compression-core

https://crates.io/crates/compression-codecs

New crates released 🎉

NobodyXu avatar Aug 23 '25 11:08 NobodyXu