antoniomuso / lz4-napi

Fastest lz4 compression library in Node.js, powered by napi-rs and lz4-flex.
MIT License
51 stars 1 forks source link

Error: the offset to copy is not contained in the decompressed buffer #544

Open alex-vukov opened 1 year ago

alex-vukov commented 1 year ago

No matter what buffer I try to decompress I always get this error: Error: the offset to copy is not contained in the decompressed buffer. The same buffer gets successfully decompressed by the lz4 library using decode. The same error happens both on uncompress and uncompressSync.

antoniomuso commented 1 year ago

Probably there is different offset formatting, how do you compress the buffer? what is the library do you use?

alex-vukov commented 1 year ago

I compress the buffer using lz4 encode(). The buffer is in LZ4 frame format. Does lz4-napi only support the block format?

antoniomuso commented 1 year ago

Sorry for the response delay, yes currently support only block format.

kravets-levko commented 6 days ago

Hi @antoniomuso! Are there any plans to support LZ4 frame format? We currently use LZ4 library, which supports it. But recently it was archived, and is not going to be supported anymore. So I'm looking for replacement for it. Unfortunately, I haven't found other LZ4 library for node with LZ4 frame format support. Your library looks the most promising so far - I see that lz4_flex supports frame format, but don't know how easy it is to add it to this library