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
{{ message }}
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
I run npm install lz4 in my project, and compress a file in node environment. Then, I decompress it in browser. But it works wrong.
I run examples/compress.html and change it a little to get a compressed buffer. And then I run examples/decompress.html, it works.
So, why files compressed with the node version of lz4 cannot be decompressed with the js version of lz4?
What I think is that no matter what lz4 tool is used to compress the file, the compressed file should finally be able to be decompressed.
What's more, I use c/c++ LZ4: https://github.com/lz4/lz4 to decompress these two Buffer. The nodeVersion Buffer can be decompressed by using function LZ4_decompress_safe when the jsVersion can't.
The text was updated successfully, but these errors were encountered:
hello everyone! I was confused by this.
npm install lz4
in my project, and compress a file in node environment. Then, I decompress it in browser. But it works wrong.examples/compress.html
and change it a little to get a compressed buffer. And then I runexamples/decompress.html
, it works.So, why files compressed with the node version of lz4 cannot be decompressed with the js version of lz4?
What I think is that no matter what lz4 tool is used to compress the file, the compressed file should finally be able to be decompressed.
Below is the node_version & js_version Buffer:
What's more, I use c/c++ LZ4: https://github.com/lz4/lz4 to decompress these two Buffer. The nodeVersion Buffer can be decompressed by using function
LZ4_decompress_safe
when the jsVersion can't.The text was updated successfully, but these errors were encountered: