PackedObjectInfo: add the full size to the description
So we can create a size index later. Change-Id: I9db47ced929fbf045fc37bead6449bbf5484d308
This commit is contained in:
parent
b58ea5c6c9
commit
60206ea95f
|
@ -31,6 +31,8 @@ public class PackedObjectInfo extends ObjectIdOwnerMap.Entry {
|
|||
|
||||
private long sizeBeforeInflating;
|
||||
|
||||
private long fullSize;
|
||||
|
||||
PackedObjectInfo(final long headerOffset, final int packedCRC,
|
||||
final AnyObjectId id) {
|
||||
super(id);
|
||||
|
@ -111,11 +113,45 @@ public void setType(int type) {
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Size in storage
|
||||
*
|
||||
* @param sizeBeforeInflating
|
||||
*/
|
||||
void setSize(long sizeBeforeInflating) {
|
||||
this.sizeBeforeInflating = sizeBeforeInflating;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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).
|
||||
*
|
||||
* @return size in storage
|
||||
*/
|
||||
long getSize() {
|
||||
return sizeBeforeInflating;
|
||||
}
|
||||
|
||||
/**
|
||||
* Real (materialized) size of the object (inflated, undeltified)
|
||||
*
|
||||
* @param size
|
||||
* size of the object in bytes, without compressing nor
|
||||
* deltifying
|
||||
* @since 6.4
|
||||
*/
|
||||
public void setFullSize(long size) {
|
||||
this.fullSize = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return size of the object (inflated, undeltified)
|
||||
*
|
||||
* @since 6.4
|
||||
*/
|
||||
public long getFullSize() {
|
||||
return fullSize;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue