LZTX compression

I have a problem file archive that has tm2 files inside a compressed archive. The images are all compressed with LZTX. I want to edit the tm2 images inside of it, first to:

-Uncompress the archive (.lzs)
-Extract its contents
-Uncompress the .tm2 images
-Edit the tm2 image | (can already do this part with current tools)
-Recompress edited tm2 image (support recompression of the edited tm2)
-Repack edited compressed tm2 image bakc inside decompressed .lzs
-Compressed .lzs archive
-repack back in .bin/.iso

There’s a decompressor included in the FF4: CC editor, but no compressor. To add that there cannot repack the iso.

It’s a small job for a unpacker, repacker and de/recompressor.BattleFF4Char.zip (139.3 KB)

git clone https://github.com/marco-calautti/FF4Tools.git
cd FF4Tools
./ff4miniarchiver -extract ../BattleFF4Char.lzs 1
cd 1
../ff4miniarchiver -create ../BattleFF4Char.lzs .
cd ..
l BattleFF4Char.lzs ../BattleFF4Char.lzs 
-rw-rw-r-- 1 xxx xxx 179200 xx xx:37 ../BattleFF4Char.lzs
-rw-rw-r-- 1 xxx xxx 179200 xx xx:51 BattleFF4Char.lzs

P.S. You can always donate me beer if it works :wink:

This only decompresses
Doesn’t recompress the edited .tm2 back inside of the .lzs archive?

It didn’t work. Sorry no beer.