fix linting

This commit is contained in:
Oliver Rahner 2022-07-21 14:00:37 +02:00
parent eda9a40aa2
commit a0546c8a3d
No known key found for this signature in database
GPG key ID: 8658521FC5B6D857
2 changed files with 22 additions and 14 deletions

View file

@ -116,16 +116,22 @@ class Protobuf {
return this.mergeDecodes(input);
}
/**
* Parse Protobuf stream data
* @param {byteArray} input
* @param {any[]} args
* @returns {any[]}
*/
static decodeStream(input, args) {
this.updateProtoRoot(args[0]);
this.showUnknownFields = args[1];
this.showTypes = args[2];
let streams = new Protobuf(input);
let output = [];
const streams = new Protobuf(input);
const output = [];
let objLength = streams._varInt();
while (!isNaN(objLength) && objLength > 0) {
let subData = streams.data.slice(streams.offset, streams.offset + objLength);
const subData = streams.data.slice(streams.offset, streams.offset + objLength);
output.push(this.mergeDecodes(subData));
streams.offset += objLength;
objLength = streams._varInt();