public interface VCDiffCodeTableWriter<OUT>
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] data,
int offset,
int length)
encode an ADD opcode with the "size" length starting at offset
|
void |
addChecksum(int checksum)
add a checksum to the code table
|
void |
copy(int offset,
int size)
encode a COPY opcode with args "offset" (into dictionary) and "size" bytes.
|
void |
finishEncoding(OUT out)
Finishes encoding.
|
void |
init(int dictionarySize)
Initializes the constructed object for use.
|
void |
output(OUT out)
Appends the encoded delta window to the output
string.
|
void |
run(int size,
byte b)
encode a RUN opcode for "size" copies of the value "b".
|
void |
writeHeader(OUT out,
EnumSet<VCDiffFormatExtension> formatExtensions)
Writes the header to the output string.
|
void init(int dictionarySize) throws IOException
dictionarySize - size of the dictionary being usedIOException - if the CodeTableWriter failed to initializevoid writeHeader(OUT out, EnumSet<VCDiffFormatExtension> formatExtensions) throws IOException
out - writer mechanism to write toformatExtensions - Flags for enabling features that are extensions to the formatIOException - if there's an exception writing to outvoid add(byte[] data,
int offset,
int length)
data - data to addoffset - offset in data to start fromlength - total bytes to addvoid copy(int offset,
int size)
offset - offset into the dictionary to copy data fromsize - number of bytes to copy from dictionaryvoid run(int size,
byte b)
size - number of copies of the value to writeb - byte value to writevoid addChecksum(int checksum)
checksum - checksum to write to the writervoid output(OUT out) throws IOException
out - writer mechanism to write toIOException - if there's an exception writing to outvoid finishEncoding(OUT out) throws IOException
out - writer mechanism to write toIOException - if there's an exception writing to outCopyright © 2018. All rights reserved.