#include <Decoder.h>
Public Member Functions | |
void | destBufferSetNew (std::vector< SourceDestBuffer > &dbufs) override |
size_t | inputProcess (const char *source, const size_t availableByteCount) override |
virtual size_t | inputProcessAligned (const char *inbuf, const size_t firstBit, const size_t endBit)=0 |
void | stateReset () override |
uint64_t | totalRecordsCompleted () override |
Public Member Functions inherited from e57::Decoder | |
unsigned | bytestreamNumber () const |
Decoder ()=delete | |
virtual void | destBufferSetNew (std::vector< SourceDestBuffer > &dbufs)=0 |
virtual size_t | inputProcess (const char *source, const size_t count)=0 |
virtual void | stateReset ()=0 |
virtual uint64_t | totalRecordsCompleted ()=0 |
virtual | ~Decoder ()=default |
Protected Member Functions | |
BitpackDecoder (unsigned bytestreamNumber, SourceDestBuffer &dbuf, unsigned alignmentSize, uint64_t maxRecordCount) | |
void | inBufferShiftDown () |
Protected Member Functions inherited from e57::Decoder | |
Decoder (unsigned bytestreamNumber) | |
Protected Attributes | |
unsigned int | bitsPerWord_ |
unsigned int | bytesPerWord_ |
uint64_t | currentRecordIndex_ = 0 |
std::shared_ptr< SourceDestBufferImpl > | destBuffer_ |
std::vector< char > | inBuffer_ |
unsigned int | inBufferAlignmentSize_ |
size_t | inBufferEndByte_ = 0 |
size_t | inBufferFirstBit_ = 0 |
uint64_t | maxRecordCount_ = 0 |
Protected Attributes inherited from e57::Decoder | |
unsigned int | bytestreamNumber_ |
Additional Inherited Members | |
Static Public Member Functions inherited from e57::Decoder | |
static std::shared_ptr< Decoder > | DecoderFactory (unsigned bytestreamNumber, const CompressedVectorNodeImpl *cVector, std::vector< SourceDestBuffer > &dbufs, const ustring &codecPath) |
|
protected |
|
overridevirtual |
Implements e57::Decoder.
References destBuffer_, e57::E57_ERROR_INTERNAL, and e57::toString().
|
protected |
Move uneaten data down to beginning of inBuffer_. Keep on natural boundaries. Moves all of word that contains inBufferFirstBit.
Overlapping regions ok with memmove().
Update indexes
References bitsPerWord_, bytesPerWord_, e57::E57_ERROR_INTERNAL, inBuffer_, inBufferEndByte_, inBufferFirstBit_, and e57::toString().
Referenced by inputProcess().
|
overridevirtual |
Copy input bytes from caller, if any
Advance tail pointer.
Update amount available from caller
??? fix doc for new bit interface Now that we have input stored in an aligned buffer, call derived class to try to eat some Note that end of filled buffer may not be at a natural boundary. The subclass may transfer this partial word in a full word transfer, but it must be done carefully to only use the defined bits. inBuffer_ is a multiple of largest word size, so this full word transfer off the end will always be in defined memory.
Shift uneaten data to beginning of inBuffer_, keep on natural word boundaries.
If the lower level processing didn't eat anything on this iteration, stop looping and tell caller how much we ate or stored.
Return the number of bytes we ate/saved.
Implements e57::Decoder.
References bitsPerWord_, bytesPerWord_, e57::E57_ERROR_INTERNAL, inBuffer_, inBufferEndByte_, inBufferFirstBit_, inBufferShiftDown(), inputProcessAligned(), and e57::toString().
|
pure virtual |
Implemented in e57::BitpackFloatDecoder, e57::BitpackStringDecoder, and e57::BitpackIntegerDecoder< RegisterT >.
Referenced by inputProcess().
|
overridevirtual |
Implements e57::Decoder.
References inBufferEndByte_, and inBufferFirstBit_.
|
overridevirtual |
Implements e57::Decoder.
References currentRecordIndex_.
|
protected |
Referenced by inBufferShiftDown(), and inputProcess().
|
protected |
Referenced by inBufferShiftDown(), and inputProcess().
|
protected |
|
protected |
|
protected |
Referenced by inBufferShiftDown(), and inputProcess().
|
protected |
|
protected |
Referenced by inBufferShiftDown(), inputProcess(), and stateReset().
|
protected |
Referenced by inBufferShiftDown(), inputProcess(), and stateReset().
|
protected |