diff --git a/src/ssn/streams/arrayBufferToStream.ts b/src/ssn/streams/arrayBufferToStream.ts index 291ddb3..e961ebd 100644 --- a/src/ssn/streams/arrayBufferToStream.ts +++ b/src/ssn/streams/arrayBufferToStream.ts @@ -9,7 +9,6 @@ export default function arrayBufferToStream(arrayBuffer: ArrayBuffer, offset = 0 let position = offset; const outStream = new stream.Readable({ - encoding: 'binary', read(size) { const chunkSize = Math.min(size || BUFFER_SIZE, arrayBuffer.byteLength - position); //TODO: we can probably remove BUFFER_SIZE let needMoreData: boolean; diff --git a/src/ssn/streams/decryptStream.ts b/src/ssn/streams/decryptStream.ts index a805e66..3470719 100644 --- a/src/ssn/streams/decryptStream.ts +++ b/src/ssn/streams/decryptStream.ts @@ -5,7 +5,6 @@ export default function decryptStream(inputStream: stream.Readable, decryptionKe let skippedRandomHeader = false; const outStream = new stream.Readable({ - encoding: 'binary', read(size) { //There are 12 random bytes at the beginning, we need to use them to initialize the decryption keys, but we can ignore the decrypted bytes. if (!skippedRandomHeader) { diff --git a/src/ssn/streams/streamSetMaxLength.ts b/src/ssn/streams/streamSetMaxLength.ts index 499caef..3b8eb69 100644 --- a/src/ssn/streams/streamSetMaxLength.ts +++ b/src/ssn/streams/streamSetMaxLength.ts @@ -9,7 +9,6 @@ export default function streamSetMaxLength(inputStream: stream.Readable, maxLeng let remaining = maxLength; const outStream = new stream.Readable({ - encoding: 'binary', read(size) { //If no size is provided, just pass through all remaining bytes if (size === undefined) {