Xenoblade Save Utility v1.2, by WulfyStylez
03/22/2016, updated 3/23/2016

This tool will allow (de)compression of Xenoblade Chronicles 3D saves (monado01, monado02, monado03), allowing for their modification.

TODO: add conversion for Wii<->3DS saves (offsets are identical, all u32s are endian-swapped, needs more research)
Decompress example:
xeno_save_tool -c monado01 save.dec
Compress example:
xeno_save_tool -d save.dec monado01


Source notes:
The decompressor code is hex-rays output that has been almost fully rewritten for cleanliness and portability.
The compressor code has just had a few pointers fixed to compile okay for x64 (and probably x86 too)
Initially I believed a compressor wouldn't be necessary since decompressed saves are *technically* supported by XC3D
However there's only ~0x8C00 allocated for the compressed save, so decompressed saves won't fit. 
Thus I quickly dug out the compression algo and got it working quickly (rather than spending hours writing and cleaning up a compression function for a single game)

Changelog:
1.1:
    -Add support for 'specialmode' files (and any other compressed data, though I think that's it...)
    -Major cleanup, compression is now its own separate lib (feel free to use in your own projects, but you must give credit)
1.2:
    -Fix save checksums at compress-time (whoops)
    -Add operation for verification of decompressed savedata
    
