Implement CerealWorldIO#encode.