public static class SequenceEncoders.TrimPrefixAndSuffixEncoder extends Object implements SequenceEncoders.IEncoder
dst relative to src by trimming
whatever non-equal suffix and prefix src and dst have.
The output code is (bytes):
{P}{K}{suffix}
where (P - 'A') bytes should be trimmed from the start of src,
(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: abc dst: abcd encoded: AAd src: abc dst: xyz encoded: ADxyz
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 |
|---|
SequenceEncoders.TrimPrefixAndSuffixEncoder() |
| 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 SequenceEncoders.TrimPrefixAndSuffixEncoder()
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 © 2014. All rights reserved.