Module Bigstring.Hexdump
type nonrec t
= Core_kernel__Bigstring.t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val to_string_hum : ?max_lines:Core_kernel__.Import.int -> ?pos:Core_kernel__.Import.int -> ?len:Core_kernel__.Import.int -> t -> Core_kernel__.Import.string
to_string_hum
renderst
as a multi-line ASCII string in hexdump format.pos
andlen
select a subrange oft
to render.max_lines
determines the maximum number of lines of hex dump to produce. If the full hex dump exceeds this number, lines in the middle are replaced by a single "..."; the beginning and end of the hex dump are left intact. In order to produce at least some readable hex dump, at least 3 lines are always produced.
val to_sequence : ?max_lines:Core_kernel__.Import.int -> ?pos:Core_kernel__.Import.int -> ?len:Core_kernel__.Import.int -> t -> Core_kernel__.Import.string Core_kernel.Sequence.t
to_sequence
produces the lines ofto_string_hum
as a sequence of strings. This may be useful for incrementally rendering a large hex dump without producing the whole thing in memory. Optional arguments function as into_string_hum
.
module Pretty : sig ... end
[%sexp_of: Hexdump.Pretty.t]
is the same as[%sexp_of: Hexdump.t]
, unless the underlying sequence of characters is entirely printable. In that case, it is rendered directly as a string. This allows e.g. test output to be much more compact in the common (printable) case while still being interpretable for any byte sequence.