package bytesrw

  1. Overview
  2. Docs
On This Page
  1. Binary strings
Composable byte stream readers and writers for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

bytesrw-0.3.0.tbz
sha512=388858b0db210a62a16f56655746fdfadbc64b22c2abb5ed5a12b2872e4f8c34f045cdb953a5dda9b92f0003c7f9f34d70fa5b5bb19fd32fb6121bbaeb7ceba0

doc/bytesrw/Bytesrw_hex/index.html

Module Bytesrw_hexSource

Hexadecimal tools.

See also Bytesrw.Bytes.pp_hex.

Binary strings

Sourceval to_binary_string : ?length:int -> string -> (string, string) result

to_binary_string hex converts hex, made of upper or lowercase US-ASCII hexadecimal digits to a binary string. If length is specified, errors if the result is not exactly length bytes.

Sourceval of_binary_string : string -> string

of_binary_string s is the bytes of s in lowercase US-ASCII hexadecimal digits.

Sourceval pp_binary_string : Format.formatter -> string -> unit

pp_binary_string ppf s formats the bytes of s with lowercase US-ASCII hexadecimal digits.

Sourceval check_binary_string_length : length:int -> string -> (string, string) result

check_binary_string_length ~length s checks that s has length bytes and errors otherwise.