diff --git a/zarr/Zarr/Storage/FilesystemStore/index.html b/zarr/Zarr/Storage/FilesystemStore/index.html index d3663212..70f63379 100644 --- a/zarr/Zarr/Storage/FilesystemStore/index.html +++ b/zarr/Zarr/Storage/FilesystemStore/index.html @@ -1,9 +1,9 @@ -FilesystemStore (zarr.Zarr.Storage.FilesystemStore)

Module Storage.FilesystemStore

include S
type t
val create_group : +FilesystemStore (zarr.Zarr.Storage.FilesystemStore)

Module Storage.FilesystemStore

A local filesystem storage backend for a Zarr V3 hierarchy.

include S
type t

The storage type.

val create_group : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> Node.t -> - unit
val create_array : + unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : ?sep:Zarr__.Extensions.separator -> ?dimension_names:string option list -> ?attributes:Yojson.Safe.t -> @@ -14,36 +14,36 @@ 'a -> Node.t -> t -> - (unit, [> Codecs.error ]) Stdlib.result
val array_metadata : + (unit, [> Codecs.error ]) Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : Node.t -> t -> (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val group_metadata : + Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : Node.t -> t -> (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val find_child_nodes : + Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : t -> Node.t -> - (Node.t list * Node.t list, string) Stdlib.result
val find_all_nodes : t -> Node.t list
val erase_node : t -> Node.t -> unit
val is_member : t -> Node.t -> bool
val set_array : + (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

erase_node t n erases node n from store t. This function erases all child nodes if n is a group node. If node n is not a member of store t then this is a no-op.

val is_member : t -> Node.t -> bool

is_member t n returns true if node n is a member of store t and false otherwise.

val set_array : Node.t -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_array : + (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : Node.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val reshape : + Stdlib.result

get_array n s k t reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : t -> Node.t -> int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val create : ?file_perm:Unix.file_perm -> string -> t
val open_store : + (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
val create : ?file_perm:Unix.file_perm -> string -> t

create ~file_perm path returns a new filesystem Zarr V3 store. This * operatioin fails if path is a directory that already exists.

val open_store : ?file_perm:Unix.file_perm -> string -> - (t, error) Stdlib.result
val open_or_create : + (t, error) Stdlib.result

open_store ~file_perm path returns an existing filesystem Zarr V3 store. * This operatioin fails if path is not a Zarr store path.

val open_or_create : ?file_perm:Unix.file_perm -> string -> - (t, error) Stdlib.result
+ (t, error) Stdlib.result

open_or_create ~file_perm path returns an existing filesystem store * and creates it if it does not exist at path path. See documentation * for open_store and create for more information.

diff --git a/zarr/Zarr/Storage/Make/argument-1-M/index.html b/zarr/Zarr/Storage/Make/argument-1-M/index.html index 5b2ef758..a8997cc7 100644 --- a/zarr/Zarr/Storage/Make/argument-1-M/index.html +++ b/zarr/Zarr/Storage/Make/argument-1-M/index.html @@ -1,5 +1,5 @@ -M (zarr.Zarr.Storage.Make.M)

Parameter Make.M

type t
val get : t -> string -> (string, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_partial_values : +M (zarr.Zarr.Storage.Make.M)

Parameter Make.M

The abstract STORE interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a / character. In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. I.e., a store is a mapping from keys to values. It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val get : t -> string -> (string, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_partial_values : t -> (string * Zarr__.Storage_intf.range) list -> string option list
val set : t -> string -> string -> unit
val set_partial_values : diff --git a/zarr/Zarr/Storage/Make/index.html b/zarr/Zarr/Storage/Make/index.html index b59accba..5ab9770c 100644 --- a/zarr/Zarr/Storage/Make/index.html +++ b/zarr/Zarr/Storage/Make/index.html @@ -1,9 +1,9 @@ -Make (zarr.Zarr.Storage.Make)

Module Storage.Make

Parameters

module M : sig ... end

Signature

type t = M.t
val create_group : +Make (zarr.Zarr.Storage.Make)

Module Storage.Make

A functor for minting a new storage type as long as it's argument module implements the STORE interface.

Parameters

module M : sig ... end

Signature

type t = M.t

The storage type.

val create_group : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> Node.t -> - unit
val create_array : + unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : ?sep:Zarr__.Extensions.separator -> ?dimension_names:string option list -> ?attributes:Yojson.Safe.t -> @@ -14,30 +14,30 @@ 'a -> Node.t -> t -> - (unit, [> Codecs.error ]) Stdlib.result
val array_metadata : + (unit, [> Codecs.error ]) Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : Node.t -> t -> (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val group_metadata : + Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : Node.t -> t -> (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val find_child_nodes : + Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : t -> Node.t -> - (Node.t list * Node.t list, string) Stdlib.result
val find_all_nodes : t -> Node.t list
val erase_node : t -> Node.t -> unit
val is_member : t -> Node.t -> bool
val set_array : + (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

erase_node t n erases node n from store t. This function erases all child nodes if n is a group node. If node n is not a member of store t then this is a no-op.

val is_member : t -> Node.t -> bool

is_member t n returns true if node n is a member of store t and false otherwise.

val set_array : Node.t -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_array : + (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : Node.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val reshape : + Stdlib.result

get_array n s k t reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : t -> Node.t -> int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
+ (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
diff --git a/zarr/Zarr/Storage/MemoryStore/index.html b/zarr/Zarr/Storage/MemoryStore/index.html index 0ca5aca3..6244a6b5 100644 --- a/zarr/Zarr/Storage/MemoryStore/index.html +++ b/zarr/Zarr/Storage/MemoryStore/index.html @@ -1,9 +1,9 @@ -MemoryStore (zarr.Zarr.Storage.MemoryStore)

Module Storage.MemoryStore

include S
type t
val create_group : +MemoryStore (zarr.Zarr.Storage.MemoryStore)

Module Storage.MemoryStore

An in-memory storage backend for Zarr V3 hierarchy.

include S
type t

The storage type.

val create_group : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> Node.t -> - unit
val create_array : + unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : ?sep:Zarr__.Extensions.separator -> ?dimension_names:string option list -> ?attributes:Yojson.Safe.t -> @@ -14,30 +14,30 @@ 'a -> Node.t -> t -> - (unit, [> Codecs.error ]) Stdlib.result
val array_metadata : + (unit, [> Codecs.error ]) Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : Node.t -> t -> (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val group_metadata : + Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : Node.t -> t -> (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val find_child_nodes : + Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : t -> Node.t -> - (Node.t list * Node.t list, string) Stdlib.result
val find_all_nodes : t -> Node.t list
val erase_node : t -> Node.t -> unit
val is_member : t -> Node.t -> bool
val set_array : + (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

erase_node t n erases node n from store t. This function erases all child nodes if n is a group node. If node n is not a member of store t then this is a no-op.

val is_member : t -> Node.t -> bool

is_member t n returns true if node n is a member of store t and false otherwise.

val set_array : Node.t -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_array : + (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : Node.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val reshape : + Stdlib.result

get_array n s k t reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : t -> Node.t -> int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val create : unit -> t
+ (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
val create : unit -> t

create () returns a new In-memory Zarr V3 store.

diff --git a/zarr/Zarr/Storage/index.html b/zarr/Zarr/Storage/index.html index bdbe77ce..ec3b7754 100644 --- a/zarr/Zarr/Storage/index.html +++ b/zarr/Zarr/Storage/index.html @@ -1,2 +1,2 @@ -Storage (zarr.Zarr.Storage)

Module Zarr.Storage

type error
module type S = sig ... end
module type MAKER = sig ... end
module Make : MAKER
module MemoryStore : sig ... end
module FilesystemStore : sig ... end
+Storage (zarr.Zarr.Storage)

Module Zarr.Storage

type error

The error type of supported storage backends.

module type S = sig ... end

The public interface of all supported stores.

module type STORE = sig ... end

The module interface that all supported stores must implement.

module type MAKER = sig ... end
module Make : MAKER

A functor for minting a new storage type as long as it's argument module implements the STORE interface.

module MemoryStore : sig ... end

An in-memory storage backend for Zarr V3 hierarchy.

module FilesystemStore : sig ... end

A local filesystem storage backend for a Zarr V3 hierarchy.

diff --git a/zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html b/zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html index ad9d223a..b7f8515e 100644 --- a/zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html +++ b/zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html @@ -1,5 +1,5 @@ -M (zarr.Zarr.Storage.MAKER.M)

Parameter MAKER.M

type t
val get : t -> string -> (string, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_partial_values : +M (zarr.Zarr.Storage.MAKER.M)

Parameter MAKER.M

The abstract STORE interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a / character. In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. I.e., a store is a mapping from keys to values. It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val get : t -> string -> (string, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_partial_values : t -> (string * Zarr__.Storage_intf.range) list -> string option list
val set : t -> string -> string -> unit
val set_partial_values : diff --git a/zarr/Zarr/Storage/module-type-MAKER/index.html b/zarr/Zarr/Storage/module-type-MAKER/index.html index 7928c746..d1bcc676 100644 --- a/zarr/Zarr/Storage/module-type-MAKER/index.html +++ b/zarr/Zarr/Storage/module-type-MAKER/index.html @@ -1,9 +1,9 @@ -MAKER (zarr.Zarr.Storage.MAKER)

Module type Storage.MAKER

Parameters

module M : sig ... end

Signature

type t = M.t
val create_group : +MAKER (zarr.Zarr.Storage.MAKER)

Module type Storage.MAKER

Parameters

module M : sig ... end

Signature

type t = M.t

The storage type.

val create_group : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> Node.t -> - unit
val create_array : + unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : ?sep:Zarr__.Extensions.separator -> ?dimension_names:string option list -> ?attributes:Yojson.Safe.t -> @@ -14,30 +14,30 @@ 'a -> Node.t -> t -> - (unit, [> Codecs.error ]) Stdlib.result
val array_metadata : + (unit, [> Codecs.error ]) Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : Node.t -> t -> (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val group_metadata : + Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : Node.t -> t -> (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val find_child_nodes : + Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : t -> Node.t -> - (Node.t list * Node.t list, string) Stdlib.result
val find_all_nodes : t -> Node.t list
val erase_node : t -> Node.t -> unit
val is_member : t -> Node.t -> bool
val set_array : + (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

erase_node t n erases node n from store t. This function erases all child nodes if n is a group node. If node n is not a member of store t then this is a no-op.

val is_member : t -> Node.t -> bool

is_member t n returns true if node n is a member of store t and false otherwise.

val set_array : Node.t -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_array : + (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : Node.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val reshape : + Stdlib.result

get_array n s k t reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : t -> Node.t -> int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
+ (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
diff --git a/zarr/Zarr/Storage/module-type-S/index.html b/zarr/Zarr/Storage/module-type-S/index.html index 2e871496..ec018684 100644 --- a/zarr/Zarr/Storage/module-type-S/index.html +++ b/zarr/Zarr/Storage/module-type-S/index.html @@ -1,9 +1,9 @@ -S (zarr.Zarr.Storage.S)

Module type Storage.S

type t
val create_group : +S (zarr.Zarr.Storage.S)

Module type Storage.S

The public interface of all supported stores.

type t

The storage type.

val create_group : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> Node.t -> - unit
val create_array : + unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : ?sep:Zarr__.Extensions.separator -> ?dimension_names:string option list -> ?attributes:Yojson.Safe.t -> @@ -14,30 +14,30 @@ 'a -> Node.t -> t -> - (unit, [> Codecs.error ]) Stdlib.result
val array_metadata : + (unit, [> Codecs.error ]) Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : Node.t -> t -> (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val group_metadata : + Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : Node.t -> t -> (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val find_child_nodes : + Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : t -> Node.t -> - (Node.t list * Node.t list, string) Stdlib.result
val find_all_nodes : t -> Node.t list
val erase_node : t -> Node.t -> unit
val is_member : t -> Node.t -> bool
val set_array : + (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

erase_node t n erases node n from store t. This function erases all child nodes if n is a group node. If node n is not a member of store t then this is a no-op.

val is_member : t -> Node.t -> bool

is_member t n returns true if node n is a member of store t and false otherwise.

val set_array : Node.t -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_array : + (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : Node.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result
val reshape : + Stdlib.result

get_array n s k t reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : t -> Node.t -> int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
+ (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
diff --git a/zarr/Zarr/Storage/module-type-STORE/index.html b/zarr/Zarr/Storage/module-type-STORE/index.html new file mode 100644 index 00000000..98e53838 --- /dev/null +++ b/zarr/Zarr/Storage/module-type-STORE/index.html @@ -0,0 +1,8 @@ + +STORE (zarr.Zarr.Storage.STORE)

Module type Storage.STORE

The module interface that all supported stores must implement.

The abstract STORE interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a / character. In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. I.e., a store is a mapping from keys to values. It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val get : t -> string -> (string, [> Zarr__.Storage_intf.error ]) Stdlib.result
val get_partial_values : + t -> + (string * Zarr__.Storage_intf.range) list -> + string option list
val set : t -> string -> string -> unit
val set_partial_values : + t -> + (string * int * string) list -> + (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result
val erase : t -> string -> unit
val erase_values : t -> string list -> unit
val erase_prefix : t -> string -> unit
val list : t -> string list
val list_prefix : string -> t -> string list
val list_dir : t -> string -> string list * string list
val is_member : t -> string -> bool