Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant