CanvasParserInternal::Decoder Struct Reference documentation

Public Member Functions | Public Attributes | List of all members
CanvasParserInternal::Decoder Struct Reference

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...

## Detailed Description

Internal and low level: the decoder of a canvas file.

## Constructor & Destructor Documentation

## ◆ Decoder()

CanvasParserInternal::Decoder::Decoder | ( |  | ) |
| inline

constructor

## Member Function Documentation

## ◆ append()

bool CanvasParserInternal::Decoder::append | ( | long | length | ) |

try to read the following sz bytes and append them to the output

## ◆ decode()

bool CanvasParserInternal::Decoder::decode | ( | long | length = `-1` | ) |

try to decode a part of the input

Referenced by CanvasParser::checkHeader().

## ◆ decode3()

bool CanvasParserInternal::Decoder::decode3 | ( | long | length | ) |

try to decode a part of the input: v3

Referenced by decode().

## ◆ initOutput()

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().

## ◆ isEnd()

bool CanvasParserInternal::Decoder::isEnd | ( |  | ) | const
| inline

returns true if the input is completly decoded

## ◆ unpackBits()

bool CanvasParserInternal::Decoder::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

Referenced by decode(), and decode3().

## Member Data Documentation

## ◆ m_input

MWAWInputStreamPtr CanvasParserInternal::Decoder::m_input

the initial input

Referenced by append(), decode(), decode3(), initOutput(), and isEnd().

## ◆ m_inputPos

long CanvasParserInternal::Decoder::m_inputPos

the input current position

Referenced by append(), decode(), initOutput(), and isEnd().

## ◆ m_isWindows

bool CanvasParserInternal::Decoder::m_isWindows

a flag to know if the file is a windows file

Referenced by CanvasParser::checkHeader(), decode3(), and unpackBits().

## ◆ m_stream

std::shared_ptr<MWAWStringStream> CanvasParserInternal::Decoder::m_stream

the current stream

Referenced by append(), decode(), decode3(), and initOutput().

## ◆ m_version

int CanvasParserInternal::Decoder::m_version

the file version

Referenced by CanvasParser::checkHeader(), and decode().

The documentation for this struct was generated from the following file:

- CanvasParser.cxx