KO OK let buffer_to_bytes = Buffer.to_bytes;; let bytes_unsafe_blit_string = Bytes.unsafe_blit_string;; type bytes = string;; module Bytes = String;; let string_init n f = if n = 0 then "" else let buf = Buffer.create n in for i = 0 to pred n do Buffer.add_char buf (f i); done; Buffer.contents buf ;; let string_copy s = string_init (String.length s) (String.get s);; let of_string = string_copy and to_string = string_copy ;; let buffer_to_bytes = Buffer.contents;; let bytes_unsafe_blit_string = Bytes.unsafe_blit;;