🚧 Testing another file for decompression

This commit is contained in:
C-3PO 2018-07-08 23:07:34 +02:00
parent a07d719d4f
commit 58cd6801c7
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -1,7 +1,7 @@
import * as fs from 'fs'; import * as fs from 'fs';
import * as zlib from 'zlib'; import * as zlib from 'zlib';
const fileReadStream = fs.createReadStream('/tmp/patcher/Assets/swtor_de-de_area_raid_1.tor'); const fileReadStream = fs.createReadStream('/tmp/patcher/Assets/swtor_de-de_area_alderaan_1.tor');
const decompressTransform = zlib.createInflateRaw(); const decompressTransform = zlib.createInflateRaw();
decompressTransform.on('error', (error) => { decompressTransform.on('error', (error) => {
@ -9,6 +9,6 @@ decompressTransform.on('error', (error) => {
throw new Error(`Error during decompression: ${error.message}`); throw new Error(`Error during decompression: ${error.message}`);
}); });
const fileWriteStream = fs.createWriteStream('/tmp/patcher/Assets/swtor_de-de_area_raid_1.tor.raw'); const fileWriteStream = fs.createWriteStream('/tmp/patcher/Assets/swtor_de-de_area_alderaan_1.tor.raw');
fileReadStream.pipe(decompressTransform).pipe(fileWriteStream); fileReadStream.pipe(decompressTransform).pipe(fileWriteStream);