When small blocks are added to a compressed buffer, the end of the compressed buffer is rewritten to make a bigger block with better compression.
This behaviour is not transparent to the user and easily leads to panics when one needs to read and add to compressed buffers concurrently.
A better approach would be to recompress small blocks when the output buffer needs to grow.
When small blocks are added to a compressed buffer, the end of the compressed buffer is rewritten to make a bigger block with better compression.
This behaviour is not transparent to the user and easily leads to panics when one needs to read and add to compressed buffers concurrently.
A better approach would be to recompress small blocks when the output buffer needs to grow.