Hacking Wii U image (WUD) compression tool

Maschell

Well-Known Member
Member
Joined
Jun 14, 2008
Messages
1,090
Trophies
2
XP
4,644
Country
Germany
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/
 

Methanoid

Well-Known Member
Member
Joined
Aug 28, 2007
Messages
115
Trophies
1
XP
808
Country
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 ??
 

nitro322

Well-Known Member
Newcomer
Joined
Mar 5, 2014
Messages
59
Trophies
0
XP
453
Country
United States
  • Like
Reactions: Methanoid

niuus

Well-Known Member
Member
Joined
Mar 4, 2016
Messages
2,023
Trophies
1
XP
4,456
Country
Venezuela
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?
 

silveria

New Member
Newbie
Joined
Jan 26, 2020
Messages
3
Trophies
0
Age
43
XP
58
Country
Bulgaria
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.
 

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,690
Trophies
1
Age
28
Location
Imola
XP
6,907
Country
Italy
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 :)
 

silveria

New Member
Newbie
Joined
Jan 26, 2020
Messages
3
Trophies
0
Age
43
XP
58
Country
Bulgaria
@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,

shawndak07

Member
Newcomer
Joined
Aug 22, 2018
Messages
5
Trophies
0
Age
31
XP
58
Country
United States
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?
 

nitro322

Well-Known Member
Newcomer
Joined
Mar 5, 2014
Messages
59
Trophies
0
XP
453
Country
United States
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.
 

Ohad1th

Well-Known Member
Member
Joined
Jul 23, 2015
Messages
250
Trophies
0
Age
28
XP
308
Country
Iceland
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
 

tony_p

Member
Newcomer
Joined
Jan 28, 2017
Messages
10
Trophies
0
Age
48
XP
84
Country
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.
 

urbanman2004

Well-Known Member
Member
Joined
Jan 10, 2013
Messages
911
Trophies
1
XP
1,611
Country
United States
.....

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).
 

nitro322

Well-Known Member
Newcomer
Joined
Mar 5, 2014
Messages
59
Trophies
0
XP
453
Country
United States
<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

General chit-chat
Help Users
  • BakerMan @ BakerMan:
    ubisoft should #stopkillinggames ngl
  • Badcatalex @ Badcatalex:
    sony should #stopkillinggames
  • Badcatalex @ Badcatalex:
    they killed LittleBigPlanet online, which was the main core of every LBP game
  • BakerMan @ BakerMan:
    for real
  • BakerMan @ BakerMan:
    at least with them, it was because of the DDOS attacks, ubisoft was just scummy
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
    K3Nv2 @ K3Nv2: I'll see the 19.0 update that blocks use ability to it +1