public class Delta
extends java.lang.Object
Constructor and Description |
---|
Delta()
Creates a Delta with a buffer size of 2048 and chunk size of 8.
|
Delta(int bufferSize,
int chunkSize) |
Modifier and Type | Method and Description |
---|---|
void |
compress(java.nio.ByteBuffer sourceBuffer,
java.nio.ByteBuffer targetBuffer,
java.nio.ByteBuffer outputBuffer) |
void |
decompress(java.nio.ByteBuffer oldData,
java.nio.ByteBuffer deltaData,
java.nio.ByteBuffer outputBuffer) |
public Delta()
public Delta(int bufferSize, int chunkSize)
bufferSize
- The maximum size a serialized object may be before or after compression.chunkSize
- A larger chunk size is faster and uses less memory, but creates larger deltas. The chunk size does not
affect decompress(ByteBuffer, ByteBuffer, ByteBuffer)
.public void compress(java.nio.ByteBuffer sourceBuffer, java.nio.ByteBuffer targetBuffer, java.nio.ByteBuffer outputBuffer)
public void decompress(java.nio.ByteBuffer oldData, java.nio.ByteBuffer deltaData, java.nio.ByteBuffer outputBuffer)
oldData
- Can be null if the delta does not contain copy commands.