Internal and low level: the decoder of a canvas file. More...
Public Member Functions | |
Decoder () | |
constructor More... | |
bool | initOutput (MWAWInputStreamPtr &input, unsigned long const headerSize=0x89c) |
first function to init the output (and copy the first headerSize characters) More... | |
bool | isEnd () const |
returns true if the input is completly decoded More... | |
bool | append (long length) |
try to read the following sz bytes and append them to the output More... | |
bool | decode (long length=-1) |
try to decode a part of the input More... | |
bool | decode3 (long length) |
try to decode a part of the input: v3 More... | |
bool | unpackBits (unsigned char const(&buffer)[256], int n, unsigned char(&buffer2)[256], int &n2) const |
try to unpack some bits from buffer into buffer2, assuming buffer and buffer2 differs More... | |
Public Attributes | |
int | m_version |
the file version More... | |
bool | m_isWindows |
a flag to know if the file is a windows file More... | |
MWAWInputStreamPtr | m_input |
the initial input More... | |
long | m_inputPos |
the input current position More... | |
std::shared_ptr< MWAWStringStream > | m_stream |
the current stream More... | |
Internal and low level: the decoder of a canvas file.
|
inline |
constructor
bool CanvasParserInternal::Decoder::append | ( | long | length | ) |
try to read the following sz bytes and append them to the output
bool CanvasParserInternal::Decoder::decode | ( | long | length = -1 | ) |
try to decode a part of the input
Referenced by CanvasParser::checkHeader().
bool CanvasParserInternal::Decoder::decode3 | ( | long | length | ) |
try to decode a part of the input: v3
Referenced by decode().
bool CanvasParserInternal::Decoder::initOutput | ( | MWAWInputStreamPtr & | input, |
unsigned long const | headerSize = 0x89c |
||
) |
first function to init the output (and copy the first headerSize characters)
Referenced by CanvasParser::checkHeader().
|
inline |
returns true if the input is completly decoded
bool CanvasParserInternal::Decoder::unpackBits | ( | unsigned char const(&) | buffer[256], |
int | n, | ||
unsigned char(&) | buffer2[256], | ||
int & | n2 | ||
) | const |
MWAWInputStreamPtr CanvasParserInternal::Decoder::m_input |
the initial input
Referenced by append(), decode(), decode3(), initOutput(), and isEnd().
long CanvasParserInternal::Decoder::m_inputPos |
the input current position
Referenced by append(), decode(), initOutput(), and isEnd().
bool CanvasParserInternal::Decoder::m_isWindows |
a flag to know if the file is a windows file
Referenced by CanvasParser::checkHeader(), decode3(), and unpackBits().
std::shared_ptr<MWAWStringStream> CanvasParserInternal::Decoder::m_stream |
the current stream
Referenced by append(), decode(), decode3(), and initOutput().
int CanvasParserInternal::Decoder::m_version |
the file version
Referenced by CanvasParser::checkHeader(), and decode().