Package org.eclipse.jgit.internal.storage.pack

Examples of org.eclipse.jgit.internal.storage.pack.DeltaEncoder


    a.setOffset(pack.length());
    objectHeader(pack, Constants.OBJ_BLOB, base.length);
    deflate(pack, base);

    ByteArrayOutputStream tmp = new ByteArrayOutputStream();
    DeltaEncoder de = new DeltaEncoder(tmp, base.length, 3L << 30);
    de.copy(0, 1);
    byte[] delta = tmp.toByteArray();
    b.setOffset(pack.length());
    objectHeader(pack, Constants.OBJ_REF_DELTA, delta.length);
    idA.copyRawTo(pack);
    deflate(pack, delta);
View Full Code Here


    return r;
  }

  private static byte[] delta(byte[] base, byte[] dest) throws IOException {
    ByteArrayOutputStream tmp = new ByteArrayOutputStream();
    DeltaEncoder de = new DeltaEncoder(tmp, base.length, dest.length);
    de.insert(dest, 0, 1);
    de.copy(1, base.length - 1);
    return tmp.toByteArray();
  }
View Full Code Here

  @Before
  public void setUp() throws Exception {
    actDeltaBuf = new ByteArrayOutputStream();
    expDeltaBuf = new ByteArrayOutputStream();
    expDeltaEnc = new DeltaEncoder(expDeltaBuf, 0, 0);
    dstBuf = new ByteArrayOutputStream();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.internal.storage.pack.DeltaEncoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.