Klaus Post

Results 402 comments of Klaus Post

Yeah, broadly there are two classes: A) Unvalidated input, like the `ReadField4` crash above, where a negative size is provided. I see the intent is to check this value, but...

Confirmed, I now only see OOM crashes, but it can't really run very long before it dies.

Yes, it is a fairly easy wrapper to do, however to make a bigger dent you would need to refactor the interface to be an `io.Reader` wrapper, otherwise you need...

It will allocate here if the dst slice is capacity too small. If the compression was done by `EncodeAll` it will contain the exact output size, so that will be...

It could be that the compressed data doesn't contain the uncompressed size and that sarama gives a slice with 0 byte capacity, so 1MB is allocated for each output. If...

Actually it could be tweaked to allocate "compressed size * 2" or at most 1MiB up front. That should make this case behave more predictable. It may have an unreasonably...

Added https://github.com/klauspost/compress/pull/295

@BradLugo The PR above has been released as `v1.11.3`.

@wyndhblb Then I think you are looking in the wrong place. Something else is holding on to the references of the output.

>even without that fix [it] behaves without memory grows... I can't explain this. AFAICT, this package uses "level 3" compression (which is a good choice). In my package level 1-4...