Repository navigation
Conversation
|
The basic idea behind these interfaces (gzip, brotli, zstd) is that you push the input and grab the output while it's available. That is, they should first check the output and ask for more until it's completely flushed.
|
|
And check for |
|
I hope I'm not being too annoying with my comments :) |
I think current version covers this cases, 2 and 3 swapped, DestinationTooSmall if other options are excluded |
No, it's ok :) |
I'll add this checks later |
|
I'm not sure if 1-3 can be false, so we need cycle here |
Yes, first compression/decompression is done, then everything is checked according to the list, and if the output is not full, and the input is not fully used, compression/decompression is done again. BrotliDecoder is done via |
But why can't compression/decompression continue on its own if there is enough data in the input and space in the output? |
|
gzip and brotli, for example, allow you to concatenate files together; when one of these blocks ends, If zstd has the same feature, it might be worth writing a test. For compression, I don’t know why they did |
Yes, it has, so it's real case. |
|
Checked two concatenated streams. |
|
GzipStream's Inflater handles concatenated streams explicitly. So it's up to you. |
|
I think if current passing tests, there's nothing more to do. As soon as you release the next version, I'll check it with my tests. |
…ll; otherwise, continue compression/decompression
|
In the case of two concatenated streams, DestinationTooSmall was returned even if there was still space available. Added a loop to fix this. |
Fix for #63