LibreOffice Module package (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ZipUtils::Deflater Class Referencefinal

#include <Deflater.hxx>

Public Member Functions

 ~Deflater ()
 Provides general purpose compression using the ZLIB compression library. More...
 
 Deflater (sal_Int32 nSetLevel, bool bNowrap)
 
void setInputSegment (const css::uno::Sequence< sal_Int8 > &rBuffer)
 
bool needsInput () const
 
void finish ()
 
bool finished () const
 
sal_Int32 doDeflateSegment (css::uno::Sequence< sal_Int8 > &rBuffer, sal_Int32 nNewLength)
 
sal_Int64 getTotalIn () const
 
sal_Int64 getTotalOut () const
 
void reset ()
 
void end ()
 

Private Types

typedef struct z_stream_s z_stream
 

Private Member Functions

void init (sal_Int32 nLevel, bool bNowrap)
 
sal_Int32 doDeflateBytes (css::uno::Sequence< sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength)
 

Private Attributes

css::uno::Sequence< sal_Int8sInBuffer
 
bool bFinish
 
bool bFinished
 
sal_Int64 nOffset
 
sal_Int64 nLength
 
sal_uInt64 nTotalOut64
 
sal_uInt64 nTotalIn64
 
std::unique_ptr< z_streampStream
 

Detailed Description

Definition at line 31 of file Deflater.hxx.

Member Typedef Documentation

◆ z_stream

typedef struct z_stream_s ZipUtils::Deflater::z_stream
private

Definition at line 33 of file Deflater.hxx.

Constructor & Destructor Documentation

◆ ~Deflater()

Deflater::~Deflater ( )

Provides general purpose compression using the ZLIB compression library.

Definition at line 34 of file Deflater.cxx.

References end().

◆ Deflater()

Deflater::Deflater ( sal_Int32  nSetLevel,
bool  bNowrap 
)

Definition at line 60 of file Deflater.cxx.

References init(), and nLength.

Member Function Documentation

◆ doDeflateBytes()

sal_Int32 Deflater::doDeflateBytes ( css::uno::Sequence< sal_Int8 > &  rBuffer,
sal_Int32  nNewOffset,
sal_Int32  nNewLength 
)
private

Definition at line 71 of file Deflater.cxx.

References bFinish, bFinished, nLength, nOffset, nTotalIn64, nTotalOut64, pStream, and sInBuffer.

Referenced by doDeflateSegment().

◆ doDeflateSegment()

sal_Int32 Deflater::doDeflateSegment ( css::uno::Sequence< sal_Int8 > &  rBuffer,
sal_Int32  nNewLength 
)

Definition at line 125 of file Deflater.cxx.

References doDeflateBytes().

Referenced by ZipOutputEntry::doDeflate().

◆ end()

void Deflater::end ( )

Definition at line 149 of file Deflater.cxx.

References pStream.

Referenced by ~Deflater().

◆ finish()

void Deflater::finish ( )

Definition at line 121 of file Deflater.cxx.

References bFinish.

Referenced by ZipOutputEntry::finishDeflater().

◆ finished()

bool ZipUtils::Deflater::finished ( ) const
inline

◆ getTotalIn()

sal_Int64 Deflater::getTotalIn ( ) const

Definition at line 130 of file Deflater.cxx.

References nTotalIn64, and pStream.

Referenced by ZipOutputEntry::getDeflaterTotalIn().

◆ getTotalOut()

sal_Int64 Deflater::getTotalOut ( ) const

Definition at line 134 of file Deflater.cxx.

References nTotalOut64, and pStream.

Referenced by ZipOutputEntry::getDeflaterTotalOut().

◆ init()

void Deflater::init ( sal_Int32  nLevel,
bool  bNowrap 
)
private

Definition at line 38 of file Deflater.cxx.

References pStream.

Referenced by Deflater().

◆ needsInput()

bool Deflater::needsInput ( ) const

Definition at line 117 of file Deflater.cxx.

References nLength.

Referenced by ZipOutputEntry::write().

◆ reset()

void Deflater::reset ( )

Definition at line 138 of file Deflater.cxx.

References bFinish, bFinished, nLength, nOffset, and pStream.

Referenced by ZipOutputEntry::deflaterReset().

◆ setInputSegment()

void Deflater::setInputSegment ( const css::uno::Sequence< sal_Int8 > &  rBuffer)

Definition at line 110 of file Deflater.cxx.

References nLength, nOffset, and sInBuffer.

Referenced by ZipOutputEntry::write().

Member Data Documentation

◆ bFinish

bool ZipUtils::Deflater::bFinish
private

Definition at line 36 of file Deflater.hxx.

Referenced by doDeflateBytes(), finish(), and reset().

◆ bFinished

bool ZipUtils::Deflater::bFinished
private

Definition at line 37 of file Deflater.hxx.

Referenced by doDeflateBytes(), and reset().

◆ nLength

sal_Int64 ZipUtils::Deflater::nLength
private

Definition at line 38 of file Deflater.hxx.

Referenced by doDeflateBytes(), needsInput(), reset(), and setInputSegment().

◆ nOffset

sal_Int64 ZipUtils::Deflater::nOffset
private

Definition at line 38 of file Deflater.hxx.

Referenced by doDeflateBytes(), reset(), and setInputSegment().

◆ nTotalIn64

sal_uInt64 ZipUtils::Deflater::nTotalIn64
private

Definition at line 40 of file Deflater.hxx.

Referenced by doDeflateBytes(), and getTotalIn().

◆ nTotalOut64

sal_uInt64 ZipUtils::Deflater::nTotalOut64
private

Definition at line 40 of file Deflater.hxx.

Referenced by doDeflateBytes(), and getTotalOut().

◆ pStream

std::unique_ptr<z_stream> ZipUtils::Deflater::pStream
private

Definition at line 41 of file Deflater.hxx.

Referenced by doDeflateBytes(), end(), getTotalIn(), getTotalOut(), init(), and reset().

◆ sInBuffer

css::uno::Sequence< sal_Int8 > ZipUtils::Deflater::sInBuffer
private

Definition at line 35 of file Deflater.hxx.

Referenced by doDeflateBytes(), and setInputSegment().


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