buf.append(" base=inpack:").append(getDeltaBase().name()); else buf.append(" base=edge:").append(getDeltaBaseId().name());
private TemporaryBuffer.Heap delta(ObjectToPack otp) throws IOException { DeltaIndex index = new DeltaIndex(buffer(otp.getDeltaBaseId())); byte[] res = buffer(otp); // We never would have proposed this pair if the delta would be // larger than the unpacked version of the object. So using it // as our buffer limit is valid: we will never reach it. // TemporaryBuffer.Heap delta = new TemporaryBuffer.Heap(res.length); index.encode(delta, res); return delta; }
} else if (otp.isDeltaRepresentation()) { int n = objectHeader(rawLength, OBJ_REF_DELTA, headerBuffer); otp.getDeltaBaseId().copyRawTo(headerBuffer, n); write(headerBuffer, 0, n + 20); } else {
@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(); } }
buf.append(" base=inpack:").append(getDeltaBase().name()); else buf.append(" base=edge:").append(getDeltaBaseId().name());
private TemporaryBuffer.Heap delta(ObjectToPack otp) throws IOException { DeltaIndex index = new DeltaIndex(buffer(otp.getDeltaBaseId())); byte[] res = buffer(otp); // We never would have proposed this pair if the delta would be // larger than the unpacked version of the object. So using it // as our buffer limit is valid: we will never reach it. // TemporaryBuffer.Heap delta = new TemporaryBuffer.Heap(res.length); index.encode(delta, res); return delta; }
private TemporaryBuffer.Heap delta(final ObjectToPack otp) throws IOException { DeltaIndex index = new DeltaIndex(buffer(otp.getDeltaBaseId())); byte[] res = buffer(otp); // We never would have proposed this pair if the delta would be // larger than the unpacked version of the object. So using it // as our buffer limit is valid: we will never reach it. // TemporaryBuffer.Heap delta = new TemporaryBuffer.Heap(res.length); index.encode(delta, res); return delta; }
} else if (otp.isDeltaRepresentation()) { int n = objectHeader(rawLength, OBJ_REF_DELTA, headerBuffer); otp.getDeltaBaseId().copyRawTo(headerBuffer, n); write(headerBuffer, 0, n + 20); } else {
} else if (otp.isDeltaRepresentation()) { int n = objectHeader(rawLength, OBJ_REF_DELTA, headerBuffer); otp.getDeltaBaseId().copyRawTo(headerBuffer, n); write(headerBuffer, 0, n + 20); } else {