Closed Jesse-Bakker closed 8 months ago
Do you mean that this currently causes an error? I had read from the doc that WriteBuf
represented a resizable bytes container which may or may not get resized by zstd so I assumed the zstd crate would take care of reallocating it as necessary... Looking closer at the trait signature it does seem indeed to not be part of impl WriteBuf for Vec
^^'
In any case, published in 0.4.1
Yes, it causes errors in practice. I agree the description of the WriteBuf trait implies that it will resize it, but I got the error, so that was an easy way to verify that it doesn't 😉
The hard-coded buffer size is sometimes too small. Get the worst-case buffer size from zstd instead.