Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns an empty array when the browser version data is too short #104

Open
moxiaolongx0 opened this issue Aug 26, 2020 · 1 comment
Open

Comments

@moxiaolongx0
Copy link

var Buffer = require('buffer').Buffer;
var LZ4 = require('lz4');
var input = Buffer.from("你好");
var output = Buffer.alloc( LZ4.encodeBound(input.length));
var compressedSize = LZ4.encodeBlock(input, output);
output = output.slice(0, compressedSize);
console.log(output);//length is 0

@moxiaolongx0
Copy link
Author

At less than 86 characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant