Very cool code, thanks for writing this and sharing it. I've run into an issue where if I send invalid data to be decoded the Decode method hangs. Any way to resolve this or do a IsValid on the input first? Thanks!