diff --git a/src/ssn/extractFileStream.ts b/src/ssn/extractFileStream.ts index a934d85..7298329 100644 --- a/src/ssn/extractFileStream.ts +++ b/src/ssn/extractFileStream.ts @@ -31,9 +31,8 @@ export default function extractFileStream(file: ISsnFileEntry, inputStream: stre let curStream = inputStream; - const storedSize = (file.decryptionKeys !== undefined) ? (12 + file.compressedSize) : file.compressedSize; //set max length (including random 12 byte encryption header) - const maxLength = streamSetMaxLength(curStream, storedSize); + const maxLength = streamSetMaxLength(curStream, file.compressedSize); curStream = maxLength; //pipe into decryption if file is encrypted