LibreOffice Module lotuswordpro (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Decompression Class Reference

#include <explode.hxx>

Collaboration diagram for Decompression:
[legend]

Public Member Functions

 Decompression (SvStream *pInStream, SvStream *pOutStream)
 
sal_Int32 explode ()
 decompress from instream to outstream More...
 
sal_uInt32 ReadBits (sal_uInt16 iCount, sal_uInt32 &nBits)
 @descr read specified bits from input stream @argument iCount - number of bits to be read, less than 31 @argument nBits - bits read More...
 
sal_uInt32 Decode (HuffmanTreeNode *pRoot)
 @descr decode tree 1 for length More...
 

Private Member Functions

void ConstructTree1 ()
 @descr construct tree 1 for length More...
 
void ConstructTree2 ()
 @descr construct tree 2 for distance More...
 
void fillArray ()
 @descr More...
 

Static Private Member Functions

static void ToString (sal_uInt32 nBits, char *pChar, sal_uInt32 nLen)
 @descr bits to string More...
 

Private Attributes

SvStreamm_pInStream
 compressed/decompressed stream More...
 
SvStreamm_pOutStream
 
sal_uInt32 m_nCurrent4Byte
 
sal_uInt32 m_nBitsLeft
 
sal_uInt8 m_Buffer [CHUNK]
 
sal_uInt8m_pBuffer
 
sal_uInt32 m_nBytesLeft
 
sal_uInt8 m_Output [MAXWIN]
 
sal_uInt32 m_nOutputBufferPos
 
sal_uInt32 m_iArrayOfM [16]
 
std::unique_ptr< HuffmanTreeNodem_Tree1
 
std::unique_ptr< HuffmanTreeNodem_Tree2
 

Detailed Description

Definition at line 84 of file explode.hxx.

Constructor & Destructor Documentation

◆ Decompression()

Decompression::Decompression ( SvStream pInStream,
SvStream pOutStream 
)

Member Function Documentation

◆ ConstructTree1()

void Decompression::ConstructTree1 ( )
private

@descr construct tree 1 for length

Returns

Definition at line 381 of file explode.cxx.

References i, m_Tree1, and Tree1String.

Referenced by Decompression().

◆ ConstructTree2()

void Decompression::ConstructTree2 ( )
private

@descr construct tree 2 for distance

Returns

Definition at line 429 of file explode.cxx.

References i, m_Tree2, and Tree2String.

Referenced by Decompression().

◆ Decode()

sal_uInt32 Decompression::Decode ( HuffmanTreeNode pRoot)

@descr decode tree 1 for length

Returns
the decoded value

Definition at line 352 of file explode.cxx.

References i, HuffmanTreeNode::QueryValue(), ReadBits(), and ToString().

Referenced by explode().

◆ explode()

sal_Int32 Decompression::explode ( )

decompress from instream to outstream

@descr decompress input and write output

Returns
0 - read OK, otherwise error

Definition at line 208 of file explode.cxx.

References Decode(), distance, SvStream::FlushBuffer(), i, L2, m_iArrayOfM, m_nOutputBufferPos, m_Output, m_pOutStream, m_Tree1, m_Tree2, MAXWIN, P1, P2, ReadBits(), SvStream::ReadBytes(), SvStream::Seek(), SvStream::SeekRel(), SvStream::Tell(), and SvStream::WriteBytes().

Referenced by Decompress().

◆ fillArray()

void Decompression::fillArray ( )
private

@descr

Returns

Definition at line 443 of file explode.cxx.

References i, and m_iArrayOfM.

Referenced by Decompression().

◆ ReadBits()

sal_uInt32 Decompression::ReadBits ( sal_uInt16  iCount,
sal_uInt32 &  nBits 
)

@descr read specified bits from input stream @argument iCount - number of bits to be read, less than 31 @argument nBits - bits read

Returns
0 - read OK, otherwise error

Definition at line 173 of file explode.cxx.

References CHUNK, m_Buffer, m_nBitsLeft, m_nBytesLeft, m_nCurrent4Byte, m_pBuffer, m_pInStream, and SvStream::ReadBytes().

Referenced by Decode(), and explode().

◆ ToString()

void Decompression::ToString ( sal_uInt32  nBits,
char *  pChar,
sal_uInt32  nLen 
)
staticprivate

@descr bits to string

Returns

Definition at line 337 of file explode.cxx.

References i, nBit, and pChar.

Referenced by Decode().

Member Data Documentation

◆ m_Buffer

sal_uInt8 Decompression::m_Buffer[CHUNK]
private

Definition at line 107 of file explode.hxx.

Referenced by ReadBits().

◆ m_iArrayOfM

sal_uInt32 Decompression::m_iArrayOfM[16]
private

Definition at line 114 of file explode.hxx.

Referenced by explode(), and fillArray().

◆ m_nBitsLeft

sal_uInt32 Decompression::m_nBitsLeft
private

Definition at line 105 of file explode.hxx.

Referenced by ReadBits().

◆ m_nBytesLeft

sal_uInt32 Decompression::m_nBytesLeft
private

Definition at line 109 of file explode.hxx.

Referenced by ReadBits().

◆ m_nCurrent4Byte

sal_uInt32 Decompression::m_nCurrent4Byte
private

Definition at line 104 of file explode.hxx.

Referenced by ReadBits().

◆ m_nOutputBufferPos

sal_uInt32 Decompression::m_nOutputBufferPos
private

Definition at line 112 of file explode.hxx.

Referenced by explode().

◆ m_Output

sal_uInt8 Decompression::m_Output[MAXWIN]
private

Definition at line 111 of file explode.hxx.

Referenced by explode().

◆ m_pBuffer

sal_uInt8* Decompression::m_pBuffer
private

Definition at line 108 of file explode.hxx.

Referenced by ReadBits().

◆ m_pInStream

SvStream* Decompression::m_pInStream
private

compressed/decompressed stream

Definition at line 101 of file explode.hxx.

Referenced by Decompression(), and ReadBits().

◆ m_pOutStream

SvStream* Decompression::m_pOutStream
private

Definition at line 102 of file explode.hxx.

Referenced by Decompression(), and explode().

◆ m_Tree1

std::unique_ptr<HuffmanTreeNode> Decompression::m_Tree1
private

Definition at line 116 of file explode.hxx.

Referenced by ConstructTree1(), and explode().

◆ m_Tree2

std::unique_ptr<HuffmanTreeNode> Decompression::m_Tree2
private

Definition at line 116 of file explode.hxx.

Referenced by ConstructTree2(), and explode().


The documentation for this class was generated from the following files: