CanvasParserInternal::Decoder Struct Reference

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

Public Member Functions

 Decoder ()
 constructor
 
bool initOutput (MWAWInputStreamPtr &input, unsigned long const headerSize=0x89c)
 first function to init the output (and copy the first headerSize characters)
 
bool isEnd () const
 returns true if the input is completly decoded
 
bool append (long length)
 try to read the following sz bytes and append them to the output
 
bool decode (long length=-1)
 try to decode a part of the input
 
bool decode3 (long length)
 try to decode a part of the input: v3
 
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
 

Public Attributes

int m_version
 the file version
 
bool m_isWindows
 a flag to know if the file is a windows file
 
MWAWInputStreamPtr m_input
 the initial input
 
long m_inputPos
 the input current position
 
std::shared_ptr< MWAWStringStreamm_stream
 the current stream
 

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:

Generated on Wed May 3 2023 07:18:29 for libmwaw by doxygen 1.9.6