Initial (broken) commit.
The encoder seems to work okay, the decoder can't handle messages with errors correctly.