#include "tensorstore/codec_spec.h"
class tensorstore::CodecSpec;

Specifies compression and other encoding/decoding parameters for a TensorStore driver.

This allows compression options to be specified as part of a Schema independent of other driver parameters and metadata.

Since compression parameters are highly driver-specific, a CodecSpec is always associated with a particular driver.

Types

using ToJsonOptions = JsonSerializationOptions;
using FromJsonOptions = JsonSerializationOptions;

JSON serialization options.

Constructors

CodecSpec();

Constructs a null codec spec.

Methods

bool valid() const;

Returns true if not null.

absl::Status MergeFrom(CodecSpec other);

Merges this codec spec with another codec spec.

static Result<CodecSpec> Merge(CodecSpec a, CodecSpec b);

Merges two codec specs.

Friend functions

friend bool operator==(const CodecSpec& a, const CodecSpec& b);
friend bool operator!=(const CodecSpec& a, const CodecSpec& b);

Compares two codec specs for equality by value.

friend std::ostream&
operator<<(std::ostream& os, const CodecSpec& codec);

Writes the JSON representation of codec to os.

friend void AbslStringify(Sink& sink, const CodecSpec& codec);

Writes the JSON representation of codec to sink.