#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 aCodecSpec b);

Merges two codec specs.

Friend functions

friend bool operator==(const CodecSpecaconst CodecSpecb);
friend bool operator!=(const CodecSpecaconst CodecSpecb);

Compares two codec specs for equality by value.

friend std::ostream&
operator<<(std::ostreamosconst CodecSpeccodec);

Writes the JSON representation of codec to os.