err.c | ||
err.h | ||
lzf.h | ||
lzf_c.c | ||
lzf_d.c | ||
lzfP.h | ||
README.md | ||
wadzip.c | ||
wadzip.dsp | ||
wadzip.dsw | ||
wadzip.txt | ||
xm.c | ||
xm.h |
wadzip utility
SRB2's own zipped WAD format compression tool.
License
Copyright (C) Sonic Team Junior, 2015
This code is made available under the terms of the GNU General Public License, version 2. You can see that license here.
Instructions
Compressed wad format:
Just like a normal wad, except:
-
The header id at the very beginning says "ZWAD" instead of PWAD or IWAD.
-
The first four bytes of each lump are (little endian) the uncompressed size. If this is zero, the lump is not compressed, and you can subtract four from the size given in the wadfile directory.
-
Unless those first four bytes give a value of 0, the lump is compressed with liblzf after that.
To compile this program, just compiling all its source files should work, that is: gcc *.c -o wadzip
[On a big-endian CPU, add "-DWORDS_BIGENDIAN" to that command line.]
Visual C++ should also work, as well as gcc.
Compress a wad: wadzip c original.wad compressed.wad Decompress a wad (restoring the original): wadzip d compressed.wad original.wad