🚧 Testing another file for decompression
This commit is contained in:
parent
a07d719d4f
commit
58cd6801c7
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue