Cross-Platform SAV/BIQ/BIX/BIC Decompressor

Quintillus

Archiving Civ3 Content
Moderator
Supporter
Joined
Mar 17, 2007
Messages
8,411
Location
Ohio
This utility makes it easy to decompress one or more SAV/BIQ/BIX/BIC files at the same time. Historically, this has not necessarily been a straightforward task. I've considered making a small utility for this for years; finally tonight I decided to go ahead and make it.

There are two versions - a GUI one, and a command-line one. The GUI one is for if you just want to decompress a few files for your own testing or use. The command-line one is useful if you wish to use it to provide decompression for your own utility programs. I currently use it in this way in my Conquests editor - when decompression is needed, it invokes the command-line version of this decompression utility as an external program, and when the command-line version terminates, the editor then reads in the decompressed file.

If you decompress My Game.SAV, the decompressed version will be called My Game Decompressed.SAV. Attempting to decompress an already-decompressed file will fail, but the original file will not be harmed. If there's demand for it, I'll add the ability to better detect already-decompressed files, but it's late and I ought to get some sleep.

The GUI version requires Java 1.6 (Win2K/OS X 10.5 or later), whereas the command-line version requires Java 1.4 (Win98/WinNT4/OS X 10.2 or later).

The command-line version runs simply:

Code:
java -jar BIQDecompressor [inFile] [outFile]

If you use OS X, you may have already been using FileValet utility by AlanH. For decompression, they should function the same, and there's no particular reason to switch to this decompressor over FileValet. The main goal of this is to provide an easy way to decompress for those of us who don't have Macs, as well as for anyone wishing to include decompression in a utility.

Credits for the decompression itself go to chiefpaco. I have only added command-line and GUI front-ends to his decompression routine.

Spoiler GPL Information :
This utility uses chiefpaco's decompression routine. As that appears to have been intended to been GPL'ed, these utilities must be also. As I understand it, you can still use this in part of your non-GPL utility as long as it is used as an external program. See the below quote from the Free Software Foundation:

Free Software Foundation said:
What is the difference between an “aggregate” and other kinds of “modified versions”?

An “aggregate” consists of a number of separate programs, distributed together on the same CD-ROM or other media. The GPL permits you to create and distribute an aggregate, even when the licenses of the other software are non-free or GPL-incompatible. The only condition is that you cannot release the aggregate under a license that prohibits users from exercising rights that each program's individual license would grant them.

Where's the line between two separate programs, and one program with two parts? This is a legal question, which ultimately judges will decide. We believe that a proper criterion depends both on the mechanism of communication (exec, pipes, rpc, function calls within a shared address space, etc.) and the semantics of the communication (what kinds of information are interchanged).

If the modules are included in the same executable file, they are definitely combined in one program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.

Obviously it would be preferable if a non-GPL decompression routine were readily available, but not knowing of any that are cross-platform, and having never seen this one fail, these utilities currently use that version. This shouldn't pose a problem for anyone if they are used properly, although even those who actually are lawyers don't appear to really know, so tread accordingly.

The source files are available inside the .JAR file by decompressing it, and then opening the biqdecompressor or biqdecompressorui folder as appropriate.
 
I've used FileValet - although it has been many years ago since I haven't played a GOTM or tried to post a SAV in quite a while. It did the job seamlessly, iirc. So I don't know if it would be different with the newer OsX versions.
 
I've used FileValet - although it has been many years ago since I haven't played a GOTM or tried to post a SAV in quite a while. It did the job seamlessly, iirc. So I don't know if it would be different with the newer OsX versions.

Yeah - if you're already on a Mac, FileValet probably still does this perfectly well. As long as it doesn't have any compatibility issues with newer versions, there's probably no reason to switch.

In this case, the "cross platform" really means "now on Windows!", but it ought to also work elsewhere.
 
I would suggest including a Mac version, as you did in your editor. Since the one will be of use with the other, having both programs made by the same person would ensure compatibility.

This should be working on Mac as well. Re-reading my first post, I realize that "An alternative if you use OS X is the FileValet utility by AlanH" can be read "this doesn't work on OS X, but File Valet will". I meant something more like "If you are using OS X, you may already be doing this with File Valet, and there's no particular reason to switch if you're happy with File Valet". I'll update that post to make that clearer.

Edit: Updated the description

I've already made use of this once to decompress a file, outside of testing it, so I'm glad I made it!
 
Can you re-compress .biq and .bix files as .bic files? For whatever reason, my copy of Civilization 3 uses .bic files, but everyone on this site uses .biq and .bix files for scenarios. I think it may be because my version is pre-v1.21f. Not sure exactly what version, just that it's pre-v1.21f. Also, I don't have conquests or any other expansions. Any help would be appreciated. :)
 
.bix files are from the Play the World expansion. .biq files are from the Conquests expansion.

A copy of Civ3 without either expansion would not be able to cope with playing scenarios from either PtW or C3C; and a copy of Civ3 with PtW but without C3C would not be able to cope with playing .biq scenarios.
 
Top Bottom