Decoding now enforces integer ranges.

Close #31.