🚧 manually decompress file to debug
This commit is contained in:
parent
864b6dc6f6
commit
a07d719d4f
1 changed files with 14 additions and 0 deletions
14
src/inflateFile.ts
Normal file
14
src/inflateFile.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import * as fs from 'fs';
|
||||
import * as zlib from 'zlib';
|
||||
|
||||
const fileReadStream = fs.createReadStream('/tmp/patcher/Assets/swtor_de-de_area_raid_1.tor');
|
||||
|
||||
const decompressTransform = zlib.createInflateRaw();
|
||||
decompressTransform.on('error', (error) => {
|
||||
//TODO: need to throw error sync, not async
|
||||
throw new Error(`Error during decompression: ${error.message}`);
|
||||
});
|
||||
|
||||
const fileWriteStream = fs.createWriteStream('/tmp/patcher/Assets/swtor_de-de_area_raid_1.tor.raw');
|
||||
|
||||
fileReadStream.pipe(decompressTransform).pipe(fileWriteStream);
|
Loading…
Reference in a new issue