gix_pack/multi_index/
mod.rs1use std::path::PathBuf;
2
3use crate::MMap;
4
5#[derive(Default, PartialEq, Eq, Ord, PartialOrd, Debug, Hash, Clone, Copy)]
7#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
8#[expect(missing_docs)]
9pub enum Version {
10 #[default]
11 V1 = 1,
12}
13
14pub type PackIndex = u32;
16
17pub type EntryIndex = u32;
19
20pub struct File<T = MMap> {
23 data: T,
24 path: std::path::PathBuf,
25 version: Version,
26 hash_len: usize,
27 object_hash: gix_hash::Kind,
28 num_indices: u32,
30 num_objects: u32,
31 alloc_limit_bytes: Option<usize>,
33
34 fan: [u32; 256],
35 index_names: Vec<PathBuf>,
36 lookup_ofs: usize,
37 offsets_ofs: usize,
38 large_offsets_ofs: Option<usize>,
39}
40
41pub mod write;
43pub use write::function::write_from_index_paths;
44
45mod access;
47
48pub mod verify;
50
51pub mod chunk;
53
54pub mod init;