Closed richarddd closed 1 year ago
Does lz4ultra use the frame or the block format? Probably the frame format
the truncate
line doesn't make sense
compressed.truncate(4 + compressed.len());
You're right, I think it's the frame format. https://github.com/emmanuel-marty/lz4ultra/blob/master/src/frame.c
So then i'm probably using the wrong format. Do you have any examples how this could be done? (reading from compressed byte array, or similar)
Yes in the docs: https://docs.rs/lz4_flex/latest/lz4_flex/
Or the tests: https://github.com/PSeitz/lz4_flex/blob/main/tests/tests.rs#L68
Yes in the docs: https://docs.rs/lz4_flex/latest/lz4_flex/
Or the tests: https://github.com/PSeitz/lz4_flex/blob/main/tests/tests.rs#L68
Thank you. I tired that but getting: "read after the end of the buffer"
Maybe lz4ultra uses the hc format which i know isn't supported yet 🤔
there is no hc format, just a hc algorithm which outputs the same format
Can you try if it decompresses with the official lz4
cli ? If not, then it's just incompatible with lz4
there is no hc format, just a hc algorithm which outputs the same format
Can you try if it decompresses with the official
lz4
cli ? If not, then it's just incompatible with lz4
Yeah that works.
Doh, it was my misstake. It works fine!
Hey,
Thanks for an awesome crate!
I'm facing issues when trying to decompress files that have been compressed with https://github.com/emmanuel-marty/lz4ultra I'm using block::decompress_size_prepended and ofc prepended the size of the uncompressed data into my compressed byte array as LE.
Failes with:
thread 'main' panicked at 'assertion failed: start_ptr >= output_base
In here decompress.rs:300:13