Skip to content

File acquire.zarr.h

FileList > acquire-zarr > include > acquire.zarr.h

Go to the source code of this file

Classes

Type Name
struct ZarrStreamSettings
The settings for a Zarr stream.

Public Types

Type Name
typedef struct ZarrStream_s ZarrStream

Public Functions

Type Name
ZarrStatusCode ZarrArraySettings_create_dimension_array (ZarrArraySettings * settings, size_t dimension_count)
Allocate memory for the dimension array in the Zarr array settings struct.
void ZarrArraySettings_destroy_dimension_array (ZarrArraySettings * settings)
Free memory for the dimension array in the Zarr array settings struct.
ZarrStatusCode ZarrStreamSettings_create_arrays (ZarrStreamSettings * settings, size_t array_count)
Allocate memory for the ZarrArraySettings array in the Zarr stream settings struct.
void ZarrStreamSettings_destroy_arrays (ZarrStreamSettings * settings)
Free memory for the ZarrArraySettings array in the Zarr stream.
ZarrStatusCode ZarrStream_append (ZarrStream * stream, const void * data, size_t bytes_in, size_t * bytes_out, const char * key)
Append data to the Zarr stream.
ZarrStream * ZarrStream_create (ZarrStreamSettings * settings)
Create a Zarr stream.
void ZarrStream_destroy (ZarrStream * stream)
Destroy a Zarr stream.
ZarrStatusCode ZarrStream_write_custom_metadata (ZarrStream * stream, const char * custom_metadata, bool overwrite)
Write custom metadata to the Zarr stream.
const char * Zarr_get_api_version ()
Get the version of the Zarr API.
ZarrLogLevel Zarr_get_log_level ()
Get the log level for the Zarr API.
const char * Zarr_get_status_message (ZarrStatusCode code)
Get the message for the given status code.
ZarrStatusCode Zarr_set_log_level (ZarrLogLevel level)
Set the log level for the Zarr API.

Public Types Documentation

typedef ZarrStream

typedef struct ZarrStream_s ZarrStream;

Public Functions Documentation

function ZarrArraySettings_create_dimension_array

Allocate memory for the dimension array in the Zarr array settings struct.

ZarrStatusCode ZarrArraySettings_create_dimension_array (
    ZarrArraySettings * settings,
    size_t dimension_count
) 

Parameters:

  • settings The Zarr array settings struct.
  • dimension_count The number of dimensions in the array to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrArraySettings_destroy_dimension_array

Free memory for the dimension array in the Zarr array settings struct.

void ZarrArraySettings_destroy_dimension_array (
    ZarrArraySettings * settings
) 

Parameters:

  • settings The Zarr array settings struct containing the dimension array to free.

function ZarrStreamSettings_create_arrays

Allocate memory for the ZarrArraySettings array in the Zarr stream settings struct.

ZarrStatusCode ZarrStreamSettings_create_arrays (
    ZarrStreamSettings * settings,
    size_t array_count
) 

Parameters:

  • settings The Zarr stream settings struct.
  • array_count The number of Zarr arrays in the dataset to allocate memory for.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrStreamSettings_destroy_arrays

Free memory for the ZarrArraySettings array in the Zarr stream.

void ZarrStreamSettings_destroy_arrays (
    ZarrStreamSettings * settings
) 

Parameters:

  • settings The Zarr stream settings struct containing the ZarrArraySettings array to free.

function ZarrStream_append

Append data to the Zarr stream.

ZarrStatusCode ZarrStream_append (
    ZarrStream * stream,
    const void * data,
    size_t bytes_in,
    size_t * bytes_out,
    const char * key
) 

This function will block while chunks are compressed and written to the store. It will return when all data has been written. Multiple frames can be appended in a single call.

Parameters:

  • stream The Zarr stream struct.
  • data The data to append.
  • bytes_in The number of bytes in data. This can be any nonnegative integer. On a value of 0, this function will immediately return.
  • bytes_out The number of bytes written to the stream.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function ZarrStream_create

Create a Zarr stream.

ZarrStream * ZarrStream_create (
    ZarrStreamSettings * settings
) 

Parameters:

  • settings The settings for the Zarr stream.

Returns:

A pointer to the Zarr stream struct, or NULL on failure.


function ZarrStream_destroy

Destroy a Zarr stream.

void ZarrStream_destroy (
    ZarrStream * stream
) 

This function waits for all pending writes to complete and frees the memory allocated for the Zarr stream.

Parameters:

  • stream The Zarr stream struct to destroy.

function ZarrStream_write_custom_metadata

Write custom metadata to the Zarr stream.

ZarrStatusCode ZarrStream_write_custom_metadata (
    ZarrStream * stream,
    const char * custom_metadata,
    bool overwrite
) 

Parameters:

  • stream The Zarr stream struct.
  • custom_metadata JSON-formatted custom metadata to be written to the dataset.
  • overwrite If true, overwrite any existing custom metadata. Otherwise, if custom_metadata is not empty and the stream has already written custom metadata, this function will return an error.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.


function Zarr_get_api_version

Get the version of the Zarr API.

const char * Zarr_get_api_version () 

Returns:

Semver formatted version of the Zarr API.


function Zarr_get_log_level

Get the log level for the Zarr API.

ZarrLogLevel Zarr_get_log_level () 

Returns:

The log level for the Zarr API.


function Zarr_get_status_message

Get the message for the given status code.

const char * Zarr_get_status_message (
    ZarrStatusCode code
) 

Parameters:

  • code The status code.

Returns:

A human-readable status message.


function Zarr_set_log_level

Set the log level for the Zarr API.

ZarrStatusCode Zarr_set_log_level (
    ZarrLogLevel level
) 

Parameters:

  • level The log level.

Returns:

ZarrStatusCode_Success on success, or an error code on failure.



The documentation for this class was generated from the following file /home/runner/work/acquire-docs/acquire-docs/acquire-zarr/include/acquire.zarr.h