pub fn write<W: Write + Seek>(
buffered_write: W,
headers: Headers,
compatibility_checks: bool,
write_chunks: impl FnOnce(MetaData, &mut ChunkWriter<W>) -> UnitResult,
) -> UnitResult
Expand description
Immediately writes the meta data to the file. Then, calls a closure with a writer that can be used to write all pixel blocks. In the closure, you can push compressed chunks directly into the writer. Alternatively, you can create a compressor, wrapping the writer, and push the uncompressed data to it. The writer is assumed to be buffered.