Using encode and decodeOrFail from Data.Binary