gix_pack/data/input/
mod.rs

1/// An item of the iteration produced by [`BytesToEntriesIter`]
2#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
3#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4pub struct Entry {
5    /// The header of a pack entry
6    pub header: crate::data::entry::Header,
7    /// The amount of bytes used to encode the `header`. `pack_offset + header_size` is the beginning of
8    /// the compressed data in the pack.
9    pub header_size: u16,
10    /// The first byte of the entry at which the `header` can be read.
11    pub pack_offset: u64,
12    /// The bytes consumed while producing `decompressed`
13    /// These do not contain the header, which makes it possible to easily replace a RefDelta with offset deltas
14    /// when resolving thin packs.
15    /// Depends on `CompressionMode` when the iterator is initialized.
16    pub compressed: Option<Vec<u8>>,
17    /// The amount of bytes the compressed portion of the entry takes, i.e. the portion behind behind the header.
18    pub compressed_size: u64,
19    /// The CRC32 over the complete entry, that is encoded header and compressed object data.
20    /// Depends on `CompressionMode` when the iterator is initialized
21    pub crc32: Option<u32>,
22    /// The amount of decompressed bytes of the entry.
23    pub decompressed_size: u64,
24    /// Set for the last object in the iteration, providing the hash over all bytes of the iteration
25    /// for use as trailer in a pack or to verify it matches the trailer.
26    pub trailer: Option<gix_hash::ObjectId>,
27}
28
29mod entry;
30
31mod types;
32pub use types::{EntryDataMode, Error, Mode};
33
34mod bytes_to_entries;
35pub use bytes_to_entries::BytesToEntriesIter;
36
37mod lookup_ref_delta_objects;
38pub use lookup_ref_delta_objects::LookupRefDeltaObjectsIter;
39
40mod entries_to_bytes;
41pub use entries_to_bytes::EntriesToBytesIter;