gix_index/extension/sparse.rs
1use crate::extension::Signature;
2
3/// The signature of the sparse index extension, nothing more than an indicator at this time.
4pub const SIGNATURE: Signature = *b"sdir";
5
6/// Serialize the sparse index extension to `out`
7pub fn write_to(mut out: impl std::io::Write) -> Result<(), std::io::Error> {
8 out.write_all(&SIGNATURE)?;
9 out.write_all(&0_u32.to_be_bytes())?;
10 Ok(())
11}