Sukharah’s CLZ Compression Tool
Recently a wonderful soul who goes by Sukharah has managed to reverse-engineer the CLZ compression format used by AWL and AnWL.
They’ve used this knowledge to create a CLZ Compression Tool, which can be used to decompress clz files, as well as recompress them.
This is beyond amazing and opens up the project to begin work on models, animations, textures, and so much more.
Compiling / Downloading the Tool
The tool is meant to be compiled using a C++ compiler (e.g. g++). You can follow the instructions on Sukharah’s GitHub to compile it yourself.
For those not experienced in compiling programs, I’ve compiled a version that can be downloaded from [here]. I’ll be posting any newly compiled versions on the HMAPL Discord as Sukharah continues to develop the tool.
Note that this pre-compiled build will only work on Windows 10 and up, since that’s what I used to compile it.
Using the Tool
The utility is fairly straightforward.
I found the easiest method was to put your desired CLZ file in the same directory as CLZ.exe.
Then, open up a command prompt in that directory (e.g. type “cmd” in the Windows Explorer navigation bar).
Then, in the command prompt, execute the command:
clz unpack input.file.clz output.file
In the above example, I decompressed mainchapter0.arc.clz into it’s native arc format.
Quirks of Decompressed U8 Archives
The decompressed U8 archives (.arc files) seem to display improperly when viewed in BrawlBox (my former go-to arc tool).
As we can see from the above screenshot, the contents of boy_0.arc (embedded in mainchapter0.arc) are displayed before the actual boy_0.arc descriptor. This can cause mismatch/corruption issues when attempting to edit the files using BrawlBox.
After a bit of trial and error, I’ve found the best tool to work with these decompressed U8 archives is Wexos Toolbox
Now that we’re able to decompress CLZ into ARC and modify these ARC files using the appropriate tools, we can play around with models, textures, and so much more.
Recompressing CLZ Files
While decompressing is one step, we need to recompress the files back into CLZ archives for any hope of the game reading them.
Fortunately, Sukharah built this functionality into their tool as well.
Unfortunately I had some issues using the “pack” function (output files would crash when loaded into AWL), although I believe this issue has been resolved in a recent revision of the tool.
So I ended up using the memory-optimized pack method.
clz pack2 input.file output.file.clz
Files compressed using the pack2 function worked perfectly, albeit with slightly longer load times than the original AWL files.