Hacking Wii U image (WUD) compression tool

  • Thread starter Thread starter Exzap
  • Start date Start date
  • Views Views 767,905
  • Replies Replies 136
  • Likes Likes 63
Sorry to bump, but how do you decompress it back to a .wud format?
Because I need to explore the game datas (need to find texts and models of Twilight Princess HD EUR), and DiscU can't extract WUX files, and I don't want redowload the whole 25GB wud file...
Thanks ;)

EDIT : Sorry, I'm stupid... Simply drag'n'drop it again seems to work...
Code:
Input:
D:\Bureau\Emulateurs\Cemu\WudCompress\ZeldaTwilightPrincessHD.wux
Output:
D:\Bureau\Emulateurs\Cemu\WudCompress\ZeldaTwilightPrincessHD.wud
Decompressing...
30.2%

I know it's a really late response, but JWUDTool can handle .wux file natively and extract single files (Filtered by an regular expression)
http://gbatemp.net/threads/jwudtool-a-java-wiiu-disc-image-tool.453078/
 
If there are any linux users out there, you can compile a native version if you make the following changes to the source:

replace all references to "_fseeki64" to "fseeko"
replace all references to "_ftelli64" to "ftello"
replace all references to "stricmp" to "strcasecmp"

Compile with "gcc main.cpp wud.cpp -o wiiu_compress"

Could SOMEONE post a Linux x64 executable please ??
 
  • Like
Reactions: Methanoid
I made a little tool to compress Wii U images/dumps.

How does it work?
It detects duplicate sectors and only stores them once. Essentially this leads to all the empty ranges being shaved off, storing only ranges which contain file or filesystem data.
Although the algorithm is simple, it works really well. In almost all cases it will reduce the size by more than 50% (12GB+!)

Examples (uncompressed size is always 23.3GB):
Super Mario World 3D -> 2.61GB (20.69GB saved)
DKC Tropical Freeze -> 11.7GB (11.6GB saved)
Zelda WW HD -> 2.70GB (20.7GB saved)
Darksiders 2 -> 9.43GB (13.87GB saved)
Mario Party 10 -> 4.01GB (19.29GB saved)

It is lossless, meaning you can compress and uncompress a file and the outcome will still be the same. This is different to tools like WiiScrubber which actually modify the data.

Why is this better than using RAR/ZIP/etc.?
It's faster and tools can natively read it (obv. assuming they support it). At least my future releases will support compressed images directly.

Download (includes source)
Download mirror

The easiest way to use the tool is to just drag the file you want to compress/decompress onto the .exe

Note for developers:
I tried to make it easy to integrate into other projects. If you want to implement it, just include wud.cpp and wud.h and you are good to go (for reading only, code for compression is in main.cpp). API should be self-explanatory. Small adjustments are needed to make it work for non-Windows platforms.
Thanks for your app! It has been super useful for ripping and later storing my backups without wasting GB. Any room for future improvements, like compression/decompression speed?
 
Hey guys,

Is there a tool to compress extracted games (folder structure, not an image)? Games take a lot of space this way and I would love to free some space like this tool does.
 
Hey guys,

Is there a tool to compress extracted games (folder structure, not an image)? Games take a lot of space this way and I would love to free some space like this tool does.
A general purpose file archiver (or NTFS compression) - "loadiine format" is already decrypted and doesn't need any WiiU specific methods

They also take what they will take when installed, so there is no flagrant filler to remove :)
 
@Ryccardo So you mean to say that the size of decrypted game is always the smallest compared to the same game in .wuz format (which as far as I read can also be ran by CEMU without any installation).

Maybe I was not clear on my original question - I want to still use/play the games, but compress them to take less space, similarly to what this tool does by creating the .wuz compressed file.
 
Last edited by silveria,
When i try to use the tool its opens and closes, doing nothing. I've seen several people ask this question but no one answers. Any ideas?
 
When i try to use the tool its opens and closes, doing nothing. I've seen several people ask this question but no one answers. Any ideas?
How are you trying to run it? Are you just double-clicking on the EXE? If so, that's expected behavior. It's a CLI utility. Open a command prompt and run it from there. You should see something like this:

Code:
$ wudcompress
Wii U image compression tool v1.0 by Exzap
Lossless compression and decompression for Wii U dumps.

Usage:
WudCompress <game.wud/game.wux> [-noverify]

Parameters:
-noverify       Skip the file validation step at the end

It'll probably be a little different for you since I'm running this on Linux, but the same gist. Pass it a WUD file as the first argument and it'll compress it.
 
I have WUX file and it doesn't work when i try to convert it to WUD
dragged the file to the .exe file and no response
the game is Bayonetta 1 NTSC if it matters
 
If there are any linux users out there, you can compile a native version if you make the following changes to the source:

replace all references to "_fseeki64" to "fseeko"
replace all references to "_ftelli64" to "ftello"
replace all references to "stricmp" to "strcasecmp"

Compile with "gcc main.cpp wud.cpp -o wiiu_compress"
I did this, but got a few warnings when compiling (although it did compile):

main.cpp:129:21: warning: multi-character character constant [-Wmultichar] wuxHeader.magic0 = WUX_MAGIC_0; ^~~~~~~~~~~ main.cpp: In function 'int main(int, char**)': main.cpp:283:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] newExtension = ".wud"; ^~~~~~ main.cpp:288:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] newExtension = ".wux"; ^~~~~~ wud.cpp:49:26: warning: multi-character character constant [-Wmultichar] if( wuxHeader.magic0 == WUX_MAGIC_0 && wuxHeader.magic1 == WUX_MAGIC_1 )

When I ran the Linux compile on a ~1.5 GB game, the extracted file only ended up being ~2.5 GB and verification failed.

I copied the same file to Windows and it successfully decompressed it to ~24 GB.

Probably a bit late to the party, but just posting here for informative purposes.
 
.....

When I ran the Linux compile on a ~1.5 GB game, the extracted file only ended up being ~2.5 GB and verification failed.

I copied the same file to Windows and it successfully decompressed it to ~24 GB.

Probably a bit late to the party, but just posting here for informative purposes.
I say why reinvent the wheel especially since it's a straightforward process in Windows (if you follow the Wii Backup Manager instructions).
 
<SNIP>
When I ran the Linux compile on a ~1.5 GB game, the extracted file only ended up being ~2.5 GB and verification failed.

It's been a few years since that was posted, so there may be some additional changes needed to compile with the latest versions of GCC at this point. I compiled a while back using the mentioned fixes and the binary still works fine for me. You can download my copy if you'd like.
 
  • Like
Reactions: tony_p

Site & Scene News

Popular threads in this forum