···181 (default [Bigarray.Array1.dim b - off]). *)
182183val to_bigarray: t -> buffer
184-(** [to_bigarray t] converts a {!t} into a {!buffer} Bigarray, using
185 the Bigarray slicing to allocate a fresh array that preserves
186 sharing of the underlying buffer. *)
187···362 @raise Invalid_argument if [off] or [len] is negative, or
363 [Cstruct.len str - off] < [len]. *)
364365-(** {2 Debugging } *)
366-367-val hexdump: t -> unit
368-(** When the going gets tough, the tough hexdump their cstructs
369- and peer at it until the bug disappears. This will directly
370- prettyprint the contents of the cstruct to the standard output. *)
371-372-val hexdump_to_buffer: Buffer.t -> t -> unit
373-(** [hexdump_to_buffer buf c] will append the pretty-printed hexdump
374- of the cstruct [c] to the buffer [buf]. *)
375-376-val hexdump_pp: Format.formatter -> t -> unit
377-(** [hexdump_pp f c] pretty-prints a hexdump of [c] to [f]. *)
378-379-val debug: t -> string
380-(** [debug t] will print out the internal details of a cstruct such
381- as its base offset and the length, and raise an assertion failure
382- if invariants have been violated. Not intended for casual use. *)
383-384module BE : sig
385386 (** Get/set big-endian integers of various sizes. The second
···492 @raise Invalid_argument if the buffer is too small. *)
493end
4940000000000000000000495(** {2 List of buffers} *)
496497val lenv: t list -> int
···611(** [string ~off ~len str] is the subbuffer of [str] that starts at position [off]
612 (defaults to [0]) and stops at position [off + len] (defaults to
613 [String.length str]). [str] is fully-replaced by an fresh allocated
614- {!Cstruct.buffer}.
615616 @raise Invalid_argument if [off] or [off + len] are not positions of [str].
617*)
···626 [buffer]. *)
627628val start_pos : t -> int
629-(** [start_pos cs] is [cs]'s start position in the base {!Cstruct.buffer}. *)
630631val stop_pos : t -> int
632-(** [stop_pos cs] is [cs]'s stop position in the base {!Cstruct.buffer}. *)
633634val length : t -> int
635(** Returns the length of the current cstruct view. Note that this
···181 (default [Bigarray.Array1.dim b - off]). *)
182183val to_bigarray: t -> buffer
184+(** [to_bigarray t] converts a {!t} into a {!type:buffer} Bigarray, using
185 the Bigarray slicing to allocate a fresh array that preserves
186 sharing of the underlying buffer. *)
187···362 @raise Invalid_argument if [off] or [len] is negative, or
363 [Cstruct.len str - off] < [len]. *)
3640000000000000000000365module BE : sig
366367 (** Get/set big-endian integers of various sizes. The second
···473 @raise Invalid_argument if the buffer is too small. *)
474end
475476+(** {2 Debugging } *)
477+478+val hexdump: t -> unit
479+(** When the going gets tough, the tough hexdump their cstructs
480+ and peer at it until the bug disappears. This will directly
481+ prettyprint the contents of the cstruct to the standard output. *)
482+483+val hexdump_to_buffer: Buffer.t -> t -> unit
484+(** [hexdump_to_buffer buf c] will append the pretty-printed hexdump
485+ of the cstruct [c] to the buffer [buf]. *)
486+487+val hexdump_pp: Format.formatter -> t -> unit
488+(** [hexdump_pp f c] pretty-prints a hexdump of [c] to [f]. *)
489+490+val debug: t -> string
491+(** [debug t] will print out the internal details of a cstruct such
492+ as its base offset and the length, and raise an assertion failure
493+ if invariants have been violated. Not intended for casual use. *)
494+495(** {2 List of buffers} *)
496497val lenv: t list -> int
···611(** [string ~off ~len str] is the subbuffer of [str] that starts at position [off]
612 (defaults to [0]) and stops at position [off + len] (defaults to
613 [String.length str]). [str] is fully-replaced by an fresh allocated
614+ {!type:buffer}.
615616 @raise Invalid_argument if [off] or [off + len] are not positions of [str].
617*)
···626 [buffer]. *)
627628val start_pos : t -> int
629+(** [start_pos cs] is [cs]'s start position in the base {!type:buffer}. *)
630631val stop_pos : t -> int
632+(** [stop_pos cs] is [cs]'s stop position in the base {!type:buffer}. *)
633634val length : t -> int
635(** Returns the length of the current cstruct view. Note that this
+4-4
vendor/opam/cstruct/lib/cstruct_cap.mli
···35 The functions that retrieve bytes ({!get_uint8} etc.) require a [read]
36 capability, functions mutating the underlying buffer ({!set_uint8} etc.)
37 require a [write] capability. Allocation of a buffer (via {!create}, ...)
38- returns a [t] with read and write capabilities. {!ro} drops the write
39- capability, {!wo} drops the read capability. The only exception is
40 {!unsafe_to_bigarray} that returns the underlying [Bigarray.t].
4142 Accessors and mutators for fixed size integers (8, 16, 32, 64 bit) are
···524525 {ul
526 {- if [rev] is [false] (default), [l] is at least [min] and at most
527- [max] consecutive [sat] satisfying initial bytes of [cs] or {!empty}
528 if there are no such bytes. [r] are the remaining bytes of [cs].}
529 {- if [rev] is [true], [r] is at least [min] and at most [max]
530- consecutive [sat] satisfying final bytes of [cs] or {!empty}
531 if there are no such bytes. [l] are the remaining bytes of [cs].}}
532533 If [max] is unspecified the span is unlimited. If [min] is unspecified
···35 The functions that retrieve bytes ({!get_uint8} etc.) require a [read]
36 capability, functions mutating the underlying buffer ({!set_uint8} etc.)
37 require a [write] capability. Allocation of a buffer (via {!create}, ...)
38+ returns a [t] with read and write capabilities. {!val:ro} drops the write
39+ capability, {!val:wo} drops the read capability. The only exception is
40 {!unsafe_to_bigarray} that returns the underlying [Bigarray.t].
4142 Accessors and mutators for fixed size integers (8, 16, 32, 64 bit) are
···524525 {ul
526 {- if [rev] is [false] (default), [l] is at least [min] and at most
527+ [max] consecutive [sat] satisfying initial bytes of [cs] or {!is_empty}
528 if there are no such bytes. [r] are the remaining bytes of [cs].}
529 {- if [rev] is [true], [r] is at least [min] and at most [max]
530+ consecutive [sat] satisfying final bytes of [cs] or {!is_empty}
531 if there are no such bytes. [l] are the remaining bytes of [cs].}}
532533 If [max] is unspecified the span is unlimited. If [min] is unspecified
+1-2
vendor/opam/cstruct/lib/cstruct_sexp.mli
···17(** Sexpression serialisers for {!Cstruct.t} values *)
1819type buffer = Cstruct.buffer
20-(** [buffer] is an alias for the corresponding {!Cstruct.buffer} type *)
2122val sexp_of_buffer : Cstruct.buffer -> Sexplib.Sexp.t
23(** [sexp_of_buffer b] returns the s-expression representation of the raw memory buffer [b] *)
···35val t_of_sexp : Sexplib.Sexp.t -> t
36(** [t_of_sexp s] returns a fresh {!Cstruct.t} that represents the
37 s-expression previously serialised by {!sexp_of_t}. *)
38-
···17(** Sexpression serialisers for {!Cstruct.t} values *)
1819type buffer = Cstruct.buffer
20+(** [buffer] is an alias for the corresponding {!type:Cstruct.buffer} type *)
2122val sexp_of_buffer : Cstruct.buffer -> Sexplib.Sexp.t
23(** [sexp_of_buffer b] returns the s-expression representation of the raw memory buffer [b] *)
···35val t_of_sexp : Sexplib.Sexp.t -> t
36(** [t_of_sexp s] returns a fresh {!Cstruct.t} that represents the
37 s-expression previously serialised by {!sexp_of_t}. *)
0