try decompress with unknown size, -buflen is guess size#89
try decompress with unknown size, -buflen is guess size#89shuxin wants to merge 1 commit intojd-boyd:mainfrom
Conversation
54799c7 to
f7fecf6
Compare
|
I'm sorry, for the delay in responding, but if you are still interested, I would like to see test(s) added for this. |
|
lzo have no header like zstd or lz4. I know, it's a trick. Maybe there will be a better solution. |
|
It looks to me like your change makes an initial guess of 1 byte output length, which is unlikely to ever be a good guess, especially since there is no resizing if buflen is less than needed. You mention a possible better solution in python, but not as an update to the pull request. I think you can fairly safely guess that a default buflen should be at least as long as the input length. Input length * 2 might be going too far. You could look at what other libraries do. |
sorry for trick, maybe there will be a better way