Index of blocks in a source file.
The index can be passed a result buffer, and output an instruction sequence that transforms the source buffer used by the index into the result buffer. The instruction sequence can be executed by {@link BinaryDelta} to recreatethe result buffer.
An index stores the entire contents of the source buffer, but also a table of block identities mapped to locations where the block appears in the source buffer. The mapping table uses 12 bytes for every 16 bytes of source buffer, and is therefore ~75% of the source buffer size. The overall index is ~1.75x the size of the source buffer. This relationship holds for any JVM, as only a constant number of objects are allocated per index. Callers can use the method {@link #getIndexSize()} to obtain a reasonably accurate estimate ofthe complete heap space used by this index.
A {@code DeltaIndex} is thread-safe. Concurrent threads can use the sameindex to encode delta instructions for different result buffers.