Example:
// Write a pre-compressed chunk at position [0, 0]
hsize_t[2] offset = [0, 0];
ubyte[] compressedData = compress(rawData);
writeChunk(dataset.handle(), 0, offset.ptr, compressedData.length, compressedData.ptr);void writeChunk(hid_t datasetId, uint filters, const hsize_t * offset,
size_t dataSize, const void * data, hid_t dxpl = H5P_DEFAULT)Writes a raw data chunk directly to a chunked dataset.
This function writes a chunk of raw data directly to storage, bypassing the filter pipeline. This is useful when the application handles compression externally and wants to write pre-compressed data.
datasetId | Dataset identifier (must be chunked) |
filters | Filter mask indicating which filters were applied to the data |
offset | Logical position of the chunk within the dataset |
dataSize | Size of the chunk data in bytes |
data | Buffer containing the chunk data to write |
dxpl | Dataset transfer property list (default: H5P_DEFAULT) |
Example:
// Write a pre-compressed chunk at position [0, 0]
hsize_t[2] offset = [0, 0];
ubyte[] compressedData = compress(rawData);
writeChunk(dataset.handle(), 0, offset.ptr, compressedData.length, compressedData.ptr);void writeChunk(size_t N)(hid_t datasetId, uint filters, const hsize_t[N] offset,
size_t dataSize, const void * data, hid_t dxpl = H5P_DEFAULT)Writes a raw data chunk directly to a chunked dataset (array overload).
datasetId | Dataset identifier (must be chunked) |
filters | Filter mask indicating which filters were applied to the data |
offset | Logical position of the chunk within the dataset |
dataSize | Size of the chunk data in bytes |
data | Buffer containing the chunk data to write |
dxpl | Dataset transfer property list (default: H5P_DEFAULT) |
void writeChunk(T)(hid_t datasetId, uint filters, const hsize_t * offset,
const T[] data, hid_t dxpl = H5P_DEFAULT)Writes a raw data chunk directly to a chunked dataset (slice overload).
This overload accepts a typed array slice and automatically calculates the data size.
datasetId | Dataset identifier (must be chunked) |
filters | Filter mask indicating which filters were applied to the data |
offset | Logical position of the chunk within the dataset |
data | Array slice containing the chunk data to write |
dxpl | Dataset transfer property list (default: H5P_DEFAULT) |