OCaml type converter for binary protocols
