We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55a3833 commit 1dd1d7dCopy full SHA for 1dd1d7d
src/Decoder.ts
@@ -102,11 +102,7 @@ export class Decoder {
102
this.setBuffer(buffer);
103
} else {
104
// retried because data is insufficient
105
- const remainingData = new Uint8Array(
106
- this.view.buffer,
107
- this.view.byteOffset + this.pos,
108
- this.view.byteLength - this.pos,
109
- );
+ const remainingData = this.bytes.subarray(this.pos);
110
const newData = ensureUint8Array(buffer);
111
const concated = new Uint8Array(remainingData.length + newData.length);
112
concated.set(remainingData);
0 commit comments