public static class CanonicalHuffmanRabaCoder.CodedRabaImpl extends AbstractCodedRaba
| Constructor and Description |
|---|
CanonicalHuffmanRabaCoder.CodedRabaImpl(AbstractFixedByteArrayBuffer data)
Constructor used to decode a data record.
|
CanonicalHuffmanRabaCoder.CodedRabaImpl(AbstractFixedByteArrayBuffer data,
Decoder decoder,
long decoderInputsBitLength)
Constructor used when encoding a data record (more information is
available from the caller's context).
|
| Modifier and Type | Method and Description |
|---|---|
int |
capacity()
The capacity is equal to the size (the data are immutable).
|
int |
copy(int index,
OutputStream os)
This decodes the value at the specified index in a single pass onto
the caller's stream.
|
AbstractFixedByteArrayBuffer |
data()
The coded (aka compressed) data.
|
byte[] |
get(int index)
This uses two passes over the code words for the given index.
|
boolean |
isEmpty()
True iff the logical byte[][] is empty.
|
boolean |
isFull()
|
boolean |
isKeys()
|
boolean |
isNull(int index)
Return
true iff the byte[] at that index is
null. |
Iterator<byte[]> |
iterator()
Basic implementation may be overridden if a faster implementation is
available.
|
int |
length(int index)
This computes the length of the decoded byte[] by counting the code
words for the coded value.
|
int |
search(byte[] probe)
This is an efficient binary search performed without materializing the
coded byte[][].
|
int |
size()
The #of entries in the logical byte[][].
|
add, add, add, isReadOnly, set, toStringpublic CanonicalHuffmanRabaCoder.CodedRabaImpl(AbstractFixedByteArrayBuffer data)
data - The record containing the coded data.public CanonicalHuffmanRabaCoder.CodedRabaImpl(AbstractFixedByteArrayBuffer data, Decoder decoder, long decoderInputsBitLength)
data - The record containing the coded data.decoder - The decoder (optional). When not given the decoder is
reconstructed from the record.decoderInputsBitLength - The bit length of the HuffmanCodec.DecoderInputs in the coded
data record. This information is used to skip beyond the
HuffmanCodec.DecoderInputs without having to read them from the
InputBitStream.public final int size()
IRabapublic final int capacity()
public final boolean isEmpty()
IRabapublic final boolean isFull()
public final boolean isKeys()
IRabatrue the IRaba supports search and elements are
interpreted as unsigned byte[]s (B+Tree keys). For this case
the application MUST ensure that the elements are maintained in
unsigned byte[] order and that duplicates byte[]s are not
stored.
When false, the IRaba allows nulls and
the elements are interpreted as signed byte[] (B+Tree
values).
true if the IRaba represents B+Tree keys and
false if it represents B+Tree values.public AbstractFixedByteArrayBuffer data()
ICodedRabapublic boolean isNull(int index)
IRabatrue iff the byte[] at that index is
null. If IRaba.isKeys() would return
true then this method MUST return false since
nulls are not permitted for B+Tree keys.index - The index in [0:IRaba.size()-1].public int length(int index)
index - The index in [0:IRaba.size()-1].public byte[] get(int index)
index - The index in [0:IRaba.size()-1].null if a
null value was stored at that index.public int copy(int index,
OutputStream os)
index - The index in [0:IRaba.size()-1].public Iterator<byte[]> iterator()
public int search(byte[] probe)
probe - The search key.(-(insertion point) - 1). The insertion point is
defined as the point at which the key would be inserted. Note
that this guarantees that the return value will be >= 0 if and
only if the key is found.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.