#include <Decoder.h>
Public Member Functions | |
BitpackFloatDecoder (unsigned bytestreamNumber, SourceDestBuffer &dbuf, FloatPrecision precision, uint64_t maxRecordCount) | |
size_t | inputProcessAligned (const char *inbuf, const size_t firstBit, const size_t endBit) override |
Public Member Functions inherited from e57::BitpackDecoder | |
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 Attributes | |
FloatPrecision | precision_ = E57_SINGLE |
Protected Attributes inherited from e57::BitpackDecoder | |
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 Member Functions inherited from e57::BitpackDecoder | |
BitpackDecoder (unsigned bytestreamNumber, SourceDestBuffer &dbuf, unsigned alignmentSize, uint64_t maxRecordCount) | |
void | inBufferShiftDown () |
Protected Member Functions inherited from e57::Decoder | |
Decoder (unsigned bytestreamNumber) | |
BitpackFloatDecoder::BitpackFloatDecoder | ( | unsigned | bytestreamNumber, |
SourceDestBuffer & | dbuf, | ||
FloatPrecision | precision, | ||
uint64_t | maxRecordCount | ||
) |
|
overridevirtual |
Read from inbuf, decode, store in destBuffer Repeat until have filled destBuffer, or completed all records
Calc how many whole records worth of data we have in inbuf
Can't process more records than we have input data for.
Form the starting address for first data location in inBuffer
Copy floats from inbuf to destBuffer_
E57_DOUBLE precision
Form the starting address for first data location in inBuffer
Copy doubles from inbuf to destBuffer_
Update counts of records processed
Returned number of bits processed (always a multiple of alignment size).
Implements e57::BitpackDecoder.
References e57::BitpackDecoder::currentRecordIndex_, e57::BitpackDecoder::destBuffer_, e57::E57_ERROR_INTERNAL, e57::E57_SINGLE, e57::BitpackDecoder::maxRecordCount_, precision_, and e57::toString().
|
protected |
Referenced by inputProcessAligned().