Open s7dhansh opened 5 years ago
FYI, this can be worked around by creating the Buffer before hand instead of passing in the raw string
lz.compress(Buffer.from(str))
Thanks for the reports. I apologize for not being very responsive. The library has been semi-maintained for a while. I will see what is needed to fix the issue.
I've made this commit that changes two calls to Buffer() to Buffer.from():
The two calls are in:
There's a third call in:
That I did not modify, as it's in a conditional branch that shouldn't be executed on modern versions of Node.
Testing on latest node seem to pass. However this breaks on versions before 10, which I guess is okay.
I've publishd on npm (version 0.5.8).