public static class SequenceEncoders.TrimSuffixEncoder extends Object implements SequenceEncoders.IEncoder
dst relative to src by trimming
whatever non-equal suffix src has. The output code is (bytes):
{K}{suffix}
where (K - 'A') bytes should be trimmed from the end of src
and then the suffix should be appended to the resulting byte sequence.
Examples:
src: foo dst: foobar encoded: Abar src: foo dst: bar encoded: Dbar
Note: The code length is a single byte. If equal to
SequenceEncoders.REMOVE_EVERYTHING the entire src sequence
should be discarded.
| Constructor and Description |
|---|
TrimSuffixEncoder() |
| Modifier and Type | Method and Description |
|---|---|
com.carrotsearch.hppc.ByteArrayList |
decode(com.carrotsearch.hppc.ByteArrayList src,
com.carrotsearch.hppc.ByteArrayList encoded,
com.carrotsearch.hppc.ByteArrayList dst) |
com.carrotsearch.hppc.ByteArrayList |
encode(com.carrotsearch.hppc.ByteArrayList src,
com.carrotsearch.hppc.ByteArrayList dst,
com.carrotsearch.hppc.ByteArrayList encoded) |
String |
toString() |
EncoderType |
type() |
public com.carrotsearch.hppc.ByteArrayList encode(com.carrotsearch.hppc.ByteArrayList src,
com.carrotsearch.hppc.ByteArrayList dst,
com.carrotsearch.hppc.ByteArrayList encoded)
encode in interface SequenceEncoders.IEncoderpublic com.carrotsearch.hppc.ByteArrayList decode(com.carrotsearch.hppc.ByteArrayList src,
com.carrotsearch.hppc.ByteArrayList encoded,
com.carrotsearch.hppc.ByteArrayList dst)
decode in interface SequenceEncoders.IEncoderpublic EncoderType type()
type in interface SequenceEncoders.IEncoderCopyright © 2015. All rights reserved.