When objects are stored in packs Git needs the ObjectId and the offset (starting position of the object data) to perform random-access reads of objects from the pack. This extension of ObjectId includes the offset.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private long | |
| private long | |
| private long | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| public | PackedObjectInfo(AnyObjectId
the identity of the object the new instance tracks. id)Create a new structure to remember information about an object. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the 32 bit CRC checksum for the packed data.Get the 32 bit CRC checksum for the packed data. |
| public long | Returns: size of the object (inflated, undeltified)Get full size (inflated, undeltified) |
| public long | Returns: offset in pack when object has been already written, or 0 if it has not been written yetGet offset in pack when object has been already written |
| pack-priv long | |
| public int | Returns: the object type. The default type is OBJ_BAD, which is considered as unknown or invalid type.Get the object type. |
| public void | setCRC(int
checksum of all packed data (including object type code,
inflated length and delta base reference) as computed by
crc)java..Record the 32 bit CRC checksum for the packed data. |
| public void | setFullSize(long
size of the object in bytes, without compressing nor
deltifying size)Real (materialized) size of the object (inflated, undeltified) |
| public void | setOffset(long
offset where written object starts offset)Set the offset in pack when object has been written to. |
| pack-priv void | |
| public void |
| crc | back to summary |
|---|---|
| private int crc | |
| fullSize | back to summary |
|---|---|
| private long fullSize | |
| offset | back to summary |
|---|---|
| private long offset | |
| sizeBeforeInflating | back to summary |
|---|---|
| private long sizeBeforeInflating | |
| type | back to summary |
|---|---|
| private int type | |
| PackedObjectInfo | back to summary |
|---|---|
| pack-priv PackedObjectInfo(final long headerOffset, final int packedCRC, final AnyObjectId id) | |
| PackedObjectInfo | back to summary |
|---|---|
| public PackedObjectInfo(AnyObjectId id) Create a new structure to remember information about an object.
| |
| getCRC | back to summary |
|---|---|
| public int getCRC() Get the 32 bit CRC checksum for the packed data.
| |
| getFullSize | back to summary |
|---|---|
| public long getFullSize() Get full size (inflated, undeltified)
| |
| getOffset | back to summary |
|---|---|
| public long getOffset() Get offset in pack when object has been already written
| |
| getSize | back to summary |
|---|---|
| pack-priv long getSize() Size in storage (maybe deflated and/or deltified). This is the size in storage. In packs, this is the bytes used by the object contents (themselves or as deltas) compressed by zlib (deflated).
| |
| getType | back to summary |
|---|---|
| public int getType() Get the object type.
| |
| setCRC | back to summary |
|---|---|
| public void setCRC(int crc) Record the 32 bit CRC checksum for the packed data.
| |
| setFullSize | back to summary |
|---|---|
| public void setFullSize(long size) Real (materialized) size of the object (inflated, undeltified)
| |
| setOffset | back to summary |
|---|---|
| public void setOffset(long offset) Set the offset in pack when object has been written to.
| |
| setSize | back to summary |
|---|---|
| pack-priv void setSize(long sizeBeforeInflating) Size in storage
| |
| setType | back to summary |
|---|---|
| public void setType(int type) Record the object type if applicable.
| |