MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / write_to

Method write_to

atomic-core/src/change/format_v3/hash_table.rs:584–589  ·  view source on GitHub ↗

Write the hash table to a writer. Writes `len() × 32` bytes: each hash in index order, raw (no compression). The caller is responsible for writing the file header (which includes `hash_table_entries`) before calling this. # Arguments `writer` - The destination writer. # Errors Returns an I/O error if the write fails. # Examples ```rust use atomic_core::change::format_v3::HashDedupTable; le

(&self, writer: &mut W)

Source from the content-addressed store, hash-verified

582 /// assert_eq!(buf.len(), 32);
583 /// ```
584 pub fn write_to<W: Write>(&self, writer: &mut W) -> FormatResult<()> {
585 for hash in &self.hashes {
586 writer.write_all(hash)?;
587 }
588 Ok(())
589 }
590
591 /// Read a hash table from a reader.
592 ///

Calls

no outgoing calls