Package Exports
- node-pkware
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-pkware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-pkware
nodejs implementation of StormLib compression/decompression algorithm
it was the de-facto compression for games from around Y2K, like Arx Fatalis
installation / update existing version
npm i -g node-pkware
recommended node version: 8.5+
tested in node version 12.7.0
command line interface
implode <filename> --output=<filename> --keep-header --ascii|--binary --level=1|2|3 - compresses file.
if --output is omitted, then output will be placed next to input and names as <filename>.compressed.
optionally you can specify an offset from which the compressed data starts with the --offset=<int|hex>,
which is useful for mixed files, such as the fts files of Arx Fatalis
explode <filename> --output=<filename> --keep-header - decompresses file. if --output is omitted, then
output will be placed next to input and names as <filename>.decompressed. optionally you can
specify an offset from which the compressed data starts with the --offset=<int|hex>, which is useful
for mixed files, such as the fts files of Arx Fatalis
The --keep-header flag tells node-pkware to keep the portion before --offset and attach it to the
output file.
examples
explode test/files/fast.fts --output=C:/fast.fts.decompressed --offset=1816 --keep-header
explode test/files/fast.fts --output=C:/fast.fts.decompressed --offset=0x718 --keep-header
implode test/files/fast.fts.unpacked --output=C:/fast.fts --binary --level=3 --offset=1816 --keep-header
piping also works
cat c:/arx/level8.llf | explode > c:/arx/level8.llf.unpacked --keep-header
explode c:/arx/level8.llf > c:/arx/level8.llf.unpacked --keep-header
cat c:/arx/level8.llf | explode --output=c:/arx/level8.llf.unpacked --keep-header
cat e:/piping/level8.llf.unpacked | implode --binary --level=3 > e:/piping/level8.llf.comp2 --keep-header
implode e:/piping/level8.llf.unpacked --binary --level=3 > e:/piping/level8.llf.comp --keep-header
cat e:/piping/level8.llf.unpacked | implode --binary --level=3 --output="e:/piping/level8.llf.comp2" --keep-header
sources:
- https://github.com/ladislav-zezula/StormLib/tree/master/src/pklib
- https://github.com/ShieldBattery/implode-decoder