]> source.dussan.org Git - jgit.git/commit
Add getObjectSize to ObjectReader 01/1101/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 9 Jul 2010 00:08:55 +0000 (17:08 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 9 Jul 2010 17:37:47 +0000 (10:37 -0700)
commitb584cb8754796bb96526b37b26b517741b9c9d1c
treea424ea978d42cefa8b089d4ec9f8f96195bbd6e4
parent97311cd3e016679178cb37b32f1d913af57e6320
Add getObjectSize to ObjectReader

This is an informational function used by PackWriter to help it
better organize objects for delta compression.  Storage systems
can implement it to provide up more detailed size information,
or they can simply rely on the default behavior that uses the
ObjectLoader obtained from open.

For local file storage, we can obtain this information faster
through specialized routines that parse a pack object header.

Change-Id: I13a09b4effb71ea5151b51547f7d091564531e58
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/CachedObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileObjectDatabase.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/UnpackedObject.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCursor.java