private int findObjectsNeedingDelta(ObjectToPack[] list, int cnt, int type) { for (ObjectToPack otp : objectsLists[type]) { if (otp.isDoNotDelta()) // delta is disabled for this path continue; if (otp.isDeltaRepresentation()) // already reusing a delta continue; otp.setWeight(0); list[cnt++] = otp; } return cnt; }
if (isReuseAsIs()) buf.append(" reuseAsIs"); if (isDoNotDelta()) buf.append(" doNotDelta"); if (isEdge())
@Override public int compare(ObjectToPack a, ObjectToPack b) { int cmp = (a.isDoNotDelta() ? 1 : 0) - (b.isDoNotDelta() ? 1 : 0); if (cmp != 0) return cmp; cmp = a.getType() - b.getType(); if (cmp != 0) return cmp; cmp = (a.getPathHash() >>> 1) - (b.getPathHash() >>> 1); if (cmp != 0) return cmp; cmp = (a.getPathHash() & 1) - (b.getPathHash() & 1); if (cmp != 0) return cmp; cmp = (a.isEdge() ? 0 : 1) - (b.isEdge() ? 0 : 1); if (cmp != 0) return cmp; return b.getWeight() - a.getWeight(); } });
while (0 < cnt && list[cnt - 1].isDoNotDelta()) { if (!list[cnt - 1].isEdge()) nonEdgeCnt--;
private int findObjectsNeedingDelta(ObjectToPack[] list, int cnt, int type) { for (ObjectToPack otp : objectsLists[type]) { if (otp.isDoNotDelta()) // delta is disabled for this path continue; if (otp.isDeltaRepresentation()) // already reusing a delta continue; otp.setWeight(0); list[cnt++] = otp; } return cnt; }
private int findObjectsNeedingDelta(ObjectToPack[] list, int cnt, int type) { for (ObjectToPack otp : objectsLists[type]) { if (otp.isDoNotDelta()) // delta is disabled for this path continue; if (otp.isDeltaRepresentation()) // already reusing a delta continue; otp.setWeight(0); list[cnt++] = otp; } return cnt; }
if (isReuseAsIs()) buf.append(" reuseAsIs"); if (isDoNotDelta()) buf.append(" doNotDelta"); if (isEdge())
@SuppressWarnings("nls") @Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append("ObjectToPack["); buf.append(Constants.typeString(getType())); buf.append(" "); buf.append(name()); if (wantWrite()) buf.append(" wantWrite"); if (isReuseAsIs()) buf.append(" reuseAsIs"); if (isDoNotDelta()) buf.append(" doNotDelta"); if (isEdge()) buf.append(" edge"); if (getDeltaDepth() > 0) buf.append(" depth=").append(getDeltaDepth()); if (isDeltaRepresentation()) { if (getDeltaBase() != null) buf.append(" base=inpack:").append(getDeltaBase().name()); else buf.append(" base=edge:").append(getDeltaBaseId().name()); } if (isWritten()) buf.append(" offset=").append(getOffset()); buf.append("]"); return buf.toString(); } }
public int compare(ObjectToPack a, ObjectToPack b) { int cmp = (a.isDoNotDelta() ? 1 : 0) - (b.isDoNotDelta() ? 1 : 0); if (cmp != 0) return cmp; cmp = a.getType() - b.getType(); if (cmp != 0) return cmp; cmp = (a.getPathHash() >>> 1) - (b.getPathHash() >>> 1); if (cmp != 0) return cmp; cmp = (a.getPathHash() & 1) - (b.getPathHash() & 1); if (cmp != 0) return cmp; cmp = (a.isEdge() ? 0 : 1) - (b.isEdge() ? 0 : 1); if (cmp != 0) return cmp; return b.getWeight() - a.getWeight(); } });
@Override public int compare(ObjectToPack a, ObjectToPack b) { int cmp = (a.isDoNotDelta() ? 1 : 0) - (b.isDoNotDelta() ? 1 : 0); if (cmp != 0) return cmp; cmp = a.getType() - b.getType(); if (cmp != 0) return cmp; cmp = (a.getPathHash() >>> 1) - (b.getPathHash() >>> 1); if (cmp != 0) return cmp; cmp = (a.getPathHash() & 1) - (b.getPathHash() & 1); if (cmp != 0) return cmp; cmp = (a.isEdge() ? 0 : 1) - (b.isEdge() ? 0 : 1); if (cmp != 0) return cmp; return b.getWeight() - a.getWeight(); } });
while (0 < cnt && list[cnt - 1].isDoNotDelta()) { if (!list[cnt - 1].isEdge()) nonEdgeCnt--;
while (0 < cnt && list[cnt - 1].isDoNotDelta()) { if (!list[cnt - 1].isEdge()) nonEdgeCnt--;