Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx committed Feb 7, 2025
1 parent 574fbfb commit 7291d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CachedKeyDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class CachedKeyDecoder implements KeyDecoder {
this.miss++;

const str = utf8DecodeJs(bytes, inputOffset, byteLength);
// Ensure to copy a slice of bytes because the byte may be NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer.
// Ensure to copy a slice of bytes because the bytes may be a NodeJS Buffer and Buffer#slice() returns a reference to its internal ArrayBuffer.
const slicedCopyOfBytes = Uint8Array.prototype.slice.call(bytes, inputOffset, inputOffset + byteLength);
this.store(slicedCopyOfBytes, str);
return str;
Expand Down

0 comments on commit 7291d77

Please sign in to comment.