When I use gzip to recompress (BATTLE.X) file after editing, it turns out 7 bytes larger than the original file and that's after I reinsert the 8 byte header. What bytes need to be removed after recompressing the BATTLE.X file? (FF7 PSX PAL English SCES-00867)
SymphoniC said that this is because: "compression utilities by default add a time stamp when compressing"
I guess most compression utilities by default add in the filename and a time stamp when compressing and stuff like that.
It looks like something has been added to the beginning of the file.
original BATTLE.X looks like this: (first 0x28 bytes for comparison)
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F
00000000 C0 38 05 00 D8 41 07 00 1F 8B 08 00 00 00 00 00 А8 ШA ‹
00000010 00 00 C4 BD 0D 7C 5C 55 99 3F FE CC 9D 9B 64 92 ДЅ |\U™?юМќ›d’
00000020 A6 ED 4D 3A 2D 53 A8 74 ¦нM:-SЁt
after recompressing and reinserting the 8 byte header BATTLE.X looks like this
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F
00000000 C0 38 05 00 D8 41 07 00 1F 8B 08 08 9B 11 A9 60 А8 ШA ‹ › ©`
00000010 00 03 42 41 54 54 4C 45 00 C4 BD 0D 7C 5C 55 99 BATTLE ДЅ |\U™
00000020 3F FE CC 9D 9B 64 92 A6 ?юМќ›d’¦
So, I deleted in the edited BATTLE.X 7 bytes: 03 42 41 54 54 4C 45 at offset 0x11. (this means the word BATTLE, the gzip tool may have added the filename)
Then I changed 1F 8B 08 08 9B 11 A9 60 from offset 0x08 to 1F 8B 08 00 00 00 00 00. (don’t know, because there’s something wrong with that)
Did I do everything right?
Additional question. What tools are exist for working with BIN, BIN-GZIP, LZS archives, to decompress/recompress?