You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon, I did a quick test of blosc V2 and saw that its compression ratio was much worse than what I used to get with V1. I've traced it to the btune_next_blocksize function:
Essentially what happens is that when context->blocksize is set to zero it is eventually initialised based on the very first buffer that is passed into blosc2_compress_ctx, in my case it was a very small array that caused the calculated blocksize to be set to 96. Subsequent calls to btune_next_blocksize then treat this 96 as a user-supplied block size, which leads to almost no compression of bigger buffers.
The only way I see to "fix" it while, at the same time, keeping automatic block size deduction, is to include context.h and reset blocksize to zero before calling blosc2_compress_ctx, but there is a comment in the header that says that the context is an opaque type. Is there a better way to do it? Thanks!
The text was updated successfully, but these errors were encountered:
Good afternoon, I did a quick test of
blosc
V2 and saw that its compression ratio was much worse than what I used to get with V1. I've traced it to thebtune_next_blocksize
function:c-blosc2/blosc/btune.c
Lines 53 to 56 in 50a7357
Essentially what happens is that when
context->blocksize
is set to zero it is eventually initialised based on the very first buffer that is passed intoblosc2_compress_ctx
, in my case it was a very small array that caused the calculatedblocksize
to be set to 96. Subsequent calls tobtune_next_blocksize
then treat this 96 as a user-supplied block size, which leads to almost no compression of bigger buffers.The only way I see to "fix" it while, at the same time, keeping automatic block size deduction, is to include
context.h
and resetblocksize
to zero before callingblosc2_compress_ctx
, but there is a comment in the header that says that the context is an opaque type. Is there a better way to do it? Thanks!The text was updated successfully, but these errors were encountered: