Skip to main content

write_chunks

Function write_chunks 

Source
pub fn write_chunks<P, I, D>(path: P, chunks: I) -> Result<()>
where P: AsRef<Path>, I: IntoIterator<Item = D>, D: AsRef<[u8]>,
Expand description

Write data to a file in chunks

ยงExamples

use embeddenator_io::write_chunks;

let data = vec![b"chunk1", b"chunk2", b"chunk3"];
write_chunks("output.bin", &data).unwrap();