ChunkedLayoutWriter class

Writer for chunked storage layout

Chunked storage divides datasets into fixed-size chunks for efficient partial I/O and compression. This writer:

  • Validates and auto-calculates chunk dimensions
  • Divides NDArray data into chunks
  • Writes chunks sequentially with memory-efficient processing
  • Creates B-tree index for chunk lookup

Example usage:

final writer = ChunkedLayoutWriter(
  chunkDimensions: [100, 100],
  datasetDimensions: [1000, 1000],
);
final btreeAddress = await writer.writeData(byteWriter, array);
final layoutMsg = writer.writeLayoutMessage();
Inheritance

Constructors

ChunkedLayoutWriter({required List<int> chunkDimensions, required List<int> datasetDimensions, FilterPipeline? filterPipeline})
Create a chunked layout writer
ChunkedLayoutWriter.auto({required List<int> datasetDimensions, required int elementSize, FilterPipeline? filterPipeline})
Create a chunked layout writer with auto-calculated chunk dimensions
factory

Properties

chunkDimensions List<int>
final
datasetDimensions List<int>
final
dimensionality int
final
filterPipeline FilterPipeline?
final
hashCode int
The hash code for this object.
no setterinherited
layoutClass int
Get the layout class identifier
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
writeData(ByteWriter writer, NDArray array) Future<int>
Write the dataset data to the file
override
writeLayoutMessage() List<int>
Write the layout message for the object header
override

Operators

operator ==(Object other) bool
The equality operator.
inherited