Open bcardiff opened 8 years ago
Me again :-) I was reviewing a bit the deflate implementation and notice it wasn't a formal IO. Any reason not to?
I made an implementation in https://github.com/bcardiff/zlib.cr/blob/io/src/deflate_io.cr . PR is coming soon probably but, before:
deflate#dictionary=
@state
IO#read
I hope I didn't miss any corner cases, your code and specs where really helpful :-).
Any chance of getting feedback regarding the above questions? Next step would be to make a IO version of inflate.
Me again :-) I was reviewing a bit the deflate implementation and notice it wasn't a formal IO. Any reason not to?
I made an implementation in https://github.com/bcardiff/zlib.cr/blob/io/src/deflate_io.cr . PR is coming soon probably but, before:
deflate#dictionary=
has no specs at all so it complicated to migrate it.@state
as the stream. I think it is not needed.IO#read
tries to fill all the slice, probably interacting many times with zlib per each invocation. So data is kept as close as possible.I hope I didn't miss any corner cases, your code and specs where really helpful :-).
Any chance of getting feedback regarding the above questions? Next step would be to make a IO version of inflate.