Module Tezos_layer2_store.Snapshot_utils

Snapshot archives creation and extraction

type reader

The type of snapshot archive readers.

type reader_input

The type of snapshot archive readers with an input channel.

type writer

The type of snapshot archive writers.

val stdlib_reader : reader

A reader for uncompressed files or snapshot archives.

val stdlib_writer : writer

A writer for uncompressed files or snapshot archives.

val gzip_reader : reader

A reader for compressed files or snapshot archives.

val gzip_writer : writer

A writer for compressed files or snapshot archives.

val reader_format : reader -> [ `Compressed | `Uncompressed ]

Returns whether the reader is for compressed or uncompressed files.

val input_format : reader_input -> [ `Compressed | `Uncompressed ]

Returns whether the reader and input channel is for compressed or uncompressed files.

val input_source : reader_input -> [ `Local of string | `Remote of string | `Stdin ]

Returns from where the snapshot input was constructed. Either `Local filename when the snapshot is read from a local file filename or `Remote url when the snapshot file is downloaded from url.

val add_download_command : unit -> unit

Add a download snapshot command to the executable (only for internal use).

module Make (Header : sig ... end) : sig ... end