Pierre Curto
Pierre Curto
The browser implementation uses pure JS to decode/encode, whereas the node one binds to the C implementation.
I cannot see the behaviour that you describe: the output buffer gets correctly resized according to the compressed size. Could you post a fully reproducible example?
Looks like an lz4 or node issue. I will update the lz4 source at some point. Do you run into this wih node 0.12.x as well?
Rebuild with the latest version. It seems to fix the issue.
I havent been able to reproduce this. I have updated the lz4 lib to the lastest C version. In the meantime, you can still use the pure JS implementation!
All the LZ4 compressed files in the testdata directory have been generated by the C reference implementation. I agree that not all combinations are currently tested though.
@phacops nope it is a bug. I havent had time to look into it yet.
The Buffer implementation is provided by Browserify. Not sure if this can be changed, I will probably look at alternatives eventually.
I need to investigate as I dont recall. I might need to remove some of the other files (the Linux kernels) as they were provided for bug fixing. Will do...
Thanks for reporting. Please send a PR if you need it.