🗑 Remove debug message

This commit is contained in:
C-3PO 2018-07-04 19:57:55 +02:00
parent c821327a6e
commit a3bff814ef
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
3 changed files with 6 additions and 5 deletions

View file

@ -13,8 +13,9 @@ export default function getUrlContents({ host, path }: {host: string, path: stri
//In case of connection errors, exit early
request.on('error', (error) => {
request.abort();
return reject(error);
reject(error);
});
request.end();
});
}

View file

@ -31,7 +31,6 @@ export default async function extractFile(file: ISsnFileEntry, dvArray: DataView
//Decompress file
const decompressedBuffer: Buffer = await new Promise((resolve, reject) => {
console.log(new Uint8Array(dvFinal.buffer));
zlib.inflateRaw(dvFinal, (error, result) => {
if (error !== null) {
return reject(error);
@ -39,5 +38,6 @@ export default async function extractFile(file: ISsnFileEntry, dvArray: DataView
resolve(result);
});
}) as Buffer;
return decompressedBuffer.buffer as ArrayBuffer;
}

View file

@ -91,8 +91,8 @@ export default function readSsnFile(buffer: ArrayBuffer): ISsnFileEntry[] {
const fileCrc = dv.getUint32(pos, true); pos += 4;
/** compressed size */
const comprSize = dv.getUint32(pos, true); pos += 4;
/** uncompressed size */
const uncomprSize = dv.getUint32(pos, true); pos += 4;
/** decompressed size */
const decomprSize = dv.getUint32(pos, true); pos += 4;
/** file name length */
const fileNameLength = dv.getUint16(pos, true); pos += 2;
/** extra field length */
@ -158,7 +158,7 @@ export default function readSsnFile(buffer: ArrayBuffer): ISsnFileEntry[] {
offset: (centralDirOffset > 0) ? //If files are included in this archive, the centralDirOffset will not start from the beginning
posCentralDirStart - centralDirOffset + relOffset : //if file is in this archive
relOffset, //if we need to look in a disk (e.g. .z01 for this file)
size: uncomprSize,
size: decomprSize,
};
//If file is encrypted