diff --git a/README.md b/README.md index e69de29..cbbe885 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,10 @@ +## oHEX + +This package with minimal dependency cone provides functionality to decode and +encode strings into hexadecimal representation. + +As example, `Ohex.decode "4142" = "AB"`. And `Ohex.encode "AB" = "4142"`. + +There's even the property, for all strings s: `Ohex.(decode (encode s)) = s`. + +A pretty-printer is provided as well. diff --git a/ohex.mli b/ohex.mli index cfd6f74..e7d409e 100644 --- a/ohex.mli +++ b/ohex.mli @@ -27,7 +27,9 @@ val decode_into : ?skip_whitespace:bool -> string -> bytes -> ?off:int -> unit val encode : string -> string (** [encode s] encodes [s] into a freshly allocated string of double size, where - each character in [s] is encoded as two hex digits in the returned string. *) + each character in [s] is encoded as two hex digits in the returned string. + An example: [encode "AB" = "4142"]. +*) val encode_into : string -> bytes -> ?off:int -> unit -> unit (** [encode_into s dst ~off ()] encodes [s] into [dst] starting at [off]