public interface ISequenceEncoder
Derived form encoding helps in making the data for the automaton smaller and more repetitive (which results in higher compression rates).
See example implementation for details.
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
decode(ByteBuffer reuse,
ByteBuffer source,
ByteBuffer encoded)
|
ByteBuffer |
encode(ByteBuffer reuse,
ByteBuffer source,
ByteBuffer target)
|
ByteBuffer encode(ByteBuffer reuse, ByteBuffer source, ByteBuffer target)
reuse
- Reuses the provided ByteBuffer
or allocates a new one if there is not enough remaining space.source
- The source byte sequence.target
- The target byte sequence to encode relative to source
ByteBuffer
with encoded target
.ByteBuffer decode(ByteBuffer reuse, ByteBuffer source, ByteBuffer encoded)
reuse
- Reuses the provided ByteBuffer
or allocates a new one if there is not enough remaining space.source
- The source byte sequence.encoded
- The previously encoded byte sequence.ByteBuffer
with decoded target
.Copyright © 2016. All rights reserved.