Skip to content

Commit 1dd1d7d

Browse files
committed
tweaks
1 parent 55a3833 commit 1dd1d7d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Decoder.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,7 @@ export class Decoder {
102102
this.setBuffer(buffer);
103103
} else {
104104
// 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-
);
105+
const remainingData = this.bytes.subarray(this.pos);
110106
const newData = ensureUint8Array(buffer);
111107
const concated = new Uint8Array(remainingData.length + newData.length);
112108
concated.set(remainingData);

0 commit comments

Comments
 (0)