final class DeltaWindow
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
DeltaWindow.ArrayStream |
(package private) static class |
DeltaWindow.ZipStream |
Modifier and Type | Field and Description |
---|---|
private DeltaWindowEntry |
bestBase
If we have chosen a base, the window entry it was created from.
|
private long |
bytesPerUnit |
private long |
bytesProcessed |
private PackConfig |
config |
private int |
cur |
private java.util.zip.Deflater |
deflater
Used to compress cached deltas.
|
private java.lang.Object |
deltaBuf |
private DeltaCache |
deltaCache |
private int |
deltaLen |
private int |
end |
private long |
loaded
Amount of memory we have loaded right now.
|
private int |
maxDepth
Maximum depth we should create for any delta chain.
|
private long |
maxMemory
Maximum number of bytes to admit to the window at once.
|
private ProgressMonitor |
monitor |
private static boolean |
NEXT_RES |
private static boolean |
NEXT_SRC |
private ObjectReader |
reader |
private DeltaWindowEntry |
res
Window entry of the object we are currently considering.
|
private ObjectToPack[] |
toSearch |
Constructor and Description |
---|
DeltaWindow(PackConfig pc,
DeltaCache dc,
ObjectReader or,
ProgressMonitor pm,
long bpu,
ObjectToPack[] in,
int beginIndex,
int endIndex) |
Modifier and Type | Method and Description |
---|---|
private byte[] |
buffer(DeltaWindowEntry ent) |
private void |
cacheDelta(ObjectToPack srcObj,
ObjectToPack resObj) |
private void |
checkLoadable(DeltaWindowEntry ent,
long need) |
private void |
clear(DeltaWindowEntry ent) |
private void |
clearWindowOnTypeSwitch() |
private static int |
deflateBound(int insz) |
private java.util.zip.Deflater |
deflater() |
private boolean |
delta(DeltaWindowEntry src) |
private int |
deltaSizeLimit(DeltaWindowEntry src) |
private static long |
estimateIndexSize(DeltaWindowEntry ent) |
private static long |
estimateSize(ObjectToPack ent) |
private DeltaIndex |
index(DeltaWindowEntry ent) |
private void |
keepInWindow() |
(package private) DeltaTask.Slice |
remaining() |
(package private) void |
search() |
private void |
searchInWindow() |
private void |
selectDeltaBase(DeltaWindowEntry src,
java.io.OutputStream delta) |
(package private) boolean |
tryStealWork(DeltaTask.Slice s) |
private static final boolean NEXT_RES
private static final boolean NEXT_SRC
private final PackConfig config
private final DeltaCache deltaCache
private final ObjectReader reader
private final ProgressMonitor monitor
private final long bytesPerUnit
private long bytesProcessed
private final long maxMemory
private final int maxDepth
private final ObjectToPack[] toSearch
private int cur
private int end
private long loaded
private DeltaWindowEntry res
private DeltaWindowEntry bestBase
private int deltaLen
private java.lang.Object deltaBuf
private java.util.zip.Deflater deflater
DeltaWindow(PackConfig pc, DeltaCache dc, ObjectReader or, ProgressMonitor pm, long bpu, ObjectToPack[] in, int beginIndex, int endIndex)
DeltaTask.Slice remaining()
boolean tryStealWork(DeltaTask.Slice s)
void search() throws java.io.IOException
java.io.IOException
private static long estimateSize(ObjectToPack ent)
private static long estimateIndexSize(DeltaWindowEntry ent)
private void clearWindowOnTypeSwitch()
private void clear(DeltaWindowEntry ent)
private void searchInWindow() throws java.io.IOException
java.io.IOException
private boolean delta(DeltaWindowEntry src) throws java.io.IOException
java.io.IOException
private void selectDeltaBase(DeltaWindowEntry src, java.io.OutputStream delta)
private int deltaSizeLimit(DeltaWindowEntry src)
private void cacheDelta(ObjectToPack srcObj, ObjectToPack resObj)
private static int deflateBound(int insz)
private void keepInWindow()
private DeltaIndex index(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException, LargeObjectException
MissingObjectException
IncorrectObjectTypeException
java.io.IOException
LargeObjectException
private byte[] buffer(DeltaWindowEntry ent) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException, LargeObjectException
MissingObjectException
IncorrectObjectTypeException
java.io.IOException
LargeObjectException
private void checkLoadable(DeltaWindowEntry ent, long need)
private java.util.zip.Deflater deflater()