public static class SequenceEncoders.TrimInfixAndSuffixEncoder extends Object implements SequenceEncoders.IEncoder
dst relative to src by trimming
whatever non-equal suffix and infix src and dst have.
The output code is (bytes):
{X}{L}{K}{suffix}
where src's infix at position (X - 'A') and of length
(L - 'A') should be removed, then (K - 'A') bytes
should be trimmed from the end
and then the suffix should be appended to the resulting byte sequence.
Examples:
src: ayz dst: abc encoded: AACbc src: aillent dst: aller encoded: BBCr
Note: Each code's length is a single byte. If any is equal to
SequenceEncoders.REMOVE_EVERYTHING the entire src sequence
should be discarded.
| Constructor and Description |
|---|
TrimInfixAndSuffixEncoder() |
| 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.