🗑 Remove various debugging features
This commit is contained in:
parent
eb8366abdc
commit
52169d6160
2 changed files with 4 additions and 9 deletions
|
@ -22,11 +22,6 @@ export default async function extractFileAsStream(file: ISsnFileEntry, inputStre
|
|||
await readBytesFromStream(curStream, 12);
|
||||
}
|
||||
|
||||
if (skipDecompression) {
|
||||
const fileStream = fs.createWriteStream(`/tmp/patcher/${file.name}`);
|
||||
curStream.pipe(fileStream);
|
||||
}
|
||||
|
||||
if (!skipDecompression) {
|
||||
//pipe into decompression
|
||||
const decompressTransform = zlib.createInflateRaw();
|
||||
|
|
|
@ -39,8 +39,8 @@ export default async function getPatch(product: Product, from: number, to: numbe
|
|||
fileEntries.filter((file) => file.diffType === SsnDiffType.NewFile).forEach(async (file) => {
|
||||
try {
|
||||
const fileStream = await getFileFromDisks(diskFilenames, { diskStart: file.diskNumberStart, offset: file.offset, length: file.compressedSize });
|
||||
const fileContents = await extractFileAsStream(file, fileStream, true);
|
||||
console.debug(file.name, file.compressedSize); //, await streamToArrayBuffer(fileContents));
|
||||
const fileContents = await extractFileAsStream(file, fileStream);
|
||||
console.debug(file.name, file.compressedSize, await streamToArrayBuffer(fileContents));
|
||||
//TODO: need to write to disk
|
||||
} catch (error) {
|
||||
console.error(`Could not extract file "${file.name}"`, error);
|
||||
|
@ -51,8 +51,8 @@ export default async function getPatch(product: Product, from: number, to: numbe
|
|||
fileEntries.filter((file) => file.diffType === SsnDiffType.Changed).forEach(async (file) => {
|
||||
try {
|
||||
const fileStream = await getFileFromDisks(diskFilenames, { diskStart: file.diskNumberStart, offset: file.offset, length: file.compressedSize });
|
||||
const fileContents = await extractFileAsStream(file, fileStream, true);
|
||||
console.debug(file.name, file.compressedSize); //, await streamToArrayBuffer(fileContents));
|
||||
const fileContents = await extractFileAsStream(file, fileStream);
|
||||
console.debug(file.name, file.compressedSize, await streamToArrayBuffer(fileContents));
|
||||
//TODO: need to apply diffing, then write to disk
|
||||
} catch (error) {
|
||||
console.error(`Could not extract file "${file.name}"`, error);
|
||||
|
|
Loading…
Reference in a new issue