A few minor changes.

Length is unneeded because LZ4 has it's own mechanism to detect the end of the stream.
Also, you really need to update ms-wz2nx. It still writes extra data (such as width and height and now length) into the bitmap data block.