Skip to content

Commit

Permalink
Don't export endianness.
Browse files Browse the repository at this point in the history
  • Loading branch information
smimram committed Dec 15, 2023
1 parent b880881 commit 0e24594
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/metadata.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ module Make : functor (_ : CharEncoding.T) -> sig
(** Raised when the metadata is not valid. *)
exception Invalid

type endianness = MetadataBase.endianness

(** Metadata are represented as association lists. *)
type metadata = (string * string) list

Expand All @@ -35,9 +33,10 @@ module Make : functor (_ : CharEncoding.T) -> sig

type custom_parser = parser_handler -> unit

(** Abstractions for reading from various sources. *)
module Reader : sig
(** A function to read taking the buffer to fill the offset and the length and
returning the number of bytes actually read. *)
(** A function to read taking the buffer to fill the offset and the length
and returning the number of bytes actually read. *)
type t = MetadataBase.Reader.t = {
read : bytes -> int -> int -> int;
read_ba : (int -> MetadataBase.bigarray) option;
Expand All @@ -50,8 +49,10 @@ module Make : functor (_ : CharEncoding.T) -> sig
(** Go back at the beginning of the stream. *)
val reset : t -> unit

(** Specialize a parser to operate on files. *)
val with_file : ?custom_parser:custom_parser -> (t -> metadata) -> string -> metadata

(** Specialize a parser to operate on strings. *)
val with_string : ?custom_parser:custom_parser -> (t -> metadata) -> string -> metadata
end

Expand Down
1 change: 1 addition & 0 deletions src/metadataBase.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type bigarray =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t

type metadata = (string * string) list

type endianness = Big_endian | Little_endian

type parser_handler = {
Expand Down

0 comments on commit 0e24594

Please sign in to comment.