=================================================================================
=                            WDUpk by louis from hddguru
=================================================================================
WD Hdd firmware unpacker

Usage:
Use a hexeditor to dump the block you need to unpack from a wd rom firmware. 
Use the header of the block to get the file offset of the packed data (0xC), and lenght(0x8).
The headers are in lenght of 32 bytes. The first header starts with Z and it's called "Kernel Loader". 
It is loaded by some code (Bootstrap) which starts the MCU. Then, the Kernel Loader, unpacks all 
the remaining blocks, and maps them  to RAM at the locations spec in each block's header (0x1C).

The code it's a variant of LZ-Huffman compression alghorithm.

v1.0 (14-sep-2013)
-first release; tested only on a firmware I worked :P
-it only unpack data; compression to be added later.