Use Deflater directly in PackWriter
commitd0ec86033d2ea990cd2175e17ce0abe3a9df10ee
authorShawn O. Pearce <spearce@spearce.org>
Thu, 26 Mar 2009 01:21:55 +0000 (25 18:21 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 26 Mar 2009 21:06:22 +0000 (26 22:06 +0100)
tree76621b96d74eb222fc57f87163a998bc0707b7ca
parentc1ca08ef4efd6f03646ceb18dfc67af79289bf10
Use Deflater directly in PackWriter

Rather than going through all of the indirection that makes up the
DeflaterOutputStream, including the new object construction for it
and the temporary buffer it allocates internally, we can pump data
directly through our Deflater instance and use our existing 16 KB
temporary "buf" for the transient storage as we compress data to
the pack output stream.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java