Author Topic: [PC] bin-gzip extractor / creator  (Read 6548 times)

luksy

  • *
  • Posts: 375
    • View Profile
[PC] bin-gzip extractor / creator
« on: 2017-02-23 16:28:04 »
NERV Agent apparently had issues with another bin-gzip tool, so I made a new one.

Usage is pretty straightforward: give the tool one argument and it will unpack the named file, give it more than one argument and it will create a new archive with the first argument, and add the remaining arguments as archive members.

The filename extensions must be kept as-is as they contain the id used in the archive headers.

Download contains source.

https://www.dropbox.com/s/mvfd5j9o9hw8r7j/bin-gzip.7z?dl=0
« Last Edit: 2018-04-24 17:32:34 by Covarr »

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: [FF7] bin-gzip extractor / creator
« Reply #1 on: 2017-02-27 18:49:45 »
Awesome; I've grabbed a copy for posterity. Mind if I add it to the Downloads page of GameHacking.org ?

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] bin-gzip extractor / creator
« Reply #2 on: 2017-02-28 18:34:09 »
Sure, no worries.

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: [FF7] bin-gzip extractor / creator
« Reply #3 on: 2017-03-01 14:16:08 »
Done; thanks.

NERV Agent

  • I sexually identify as a multipurpose synthetic humanoid decisive weapon Evangelion.
  • *
  • Posts: 105
  • Eva Unit 01
    • View Profile
Re: [FF7] bin-gzip extractor / creator
« Reply #4 on: 2018-03-08 02:03:52 »
I realize its been like a whole year since the last post, but I noticed something with this program.

It works fine with the US version of "WINDOW.BIN". When the files are extracted, the following files are generated:

WINDOW.BIN-0.0
WINDOW.BIN-1.0
WINDOW.BIN-2.1

I wanted to see if I can edit the Japanese version. The Japanese version of "WINDOW.BIN" is 40,898 bytes. I used this version of bin-gzip to extract the files from this archive, and it generated this:

WINDOW.BIN-0.0
WINDOW.BIN-1.0
WINDOW.BIN-2.0
WINDOW.BIN-3.1

I made absolutely no edits to these files, and used bin-gzip to create another "WINDOW.BIN" using the untouched files above. The new "WINDOW.BIN" is 40,878 bytes, smaller than the original.

I have yet to see if this new smaller "WINDOW.BIN" still works, although I doubt it will.

UPDATE: I used CDmage to import this smaller "WINDOW.BIN" with unmodified files back into the game. CDmage padded out the extra space with 0s and...

...it still works. Weird....
« Last Edit: 2018-03-08 02:34:52 by NERV Agent »

luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] bin-gzip extractor / creator
« Reply #5 on: 2018-03-08 05:40:08 »
The original version probably had extra padding between the sections, have you tried diffing the binaries to see where the differences are?

NERV Agent

  • I sexually identify as a multipurpose synthetic humanoid decisive weapon Evangelion.
  • *
  • Posts: 105
  • Eva Unit 01
    • View Profile
Re: [FF7] bin-gzip extractor / creator
« Reply #6 on: 2018-03-08 08:04:46 »
Here are my results (the bottom right corner).

The file on top is the original "WINDOW.BIN".

The file on the bottom is the new "WINDOW.BIN" generated with unmodified files with bin-gzip after being padded by 0s by CDmage.




luksy

  • *
  • Posts: 375
    • View Profile
Re: [FF7] bin-gzip extractor / creator
« Reply #7 on: 2018-03-08 08:19:17 »
In that case it looks like whatever code they originally used for compressing the files was marginally less efficient, nothing to worry about.