Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jm::Deflater Class Reference

Compression class for DEFLATE-compressed data. The basis is RFC 1950 and RFC 1951. As of 2017-01-14, the own implementation was exchanged in favour of zlib. More...

Inheritance diagram for jm::Deflater:
jm::Object

Public Member Functions

 Deflater ()
 Constructor.
 
 ~Deflater () override=default
 Constructor.
 
void setInput (uint8 *buffer, size_t length)
 Gives this class a block of bytes to compress.
 
void deflate (uint8 *&buffer, size_t &length)
 This method compresses the data in the buffer \discussion Both parameters are output values and are initialised by this method. The caller must clean up the array himself afterwards.
 
void reset ()
 Resets the compressor so that a new object can be compressed.
 
size_t totalInSize () const
 Returns the total number of bytes of the uncompressed input.
 
size_t totalOutSize () const
 Returns the total number of bytes of the compressed output.
 
- Public Member Functions inherited from jm::Object
 Object () noexcept
 Constructor.
 
virtual ~Object () noexcept
 Destructor.
 
void release () noexcept
 Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
 
Objectretain () noexcept
 Increases the reference counter of this object by 1.
 
Objectautorelease () noexcept
 Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
 
int32 referenceCount () const noexcept
 Returns the value of the reference counter.
 
virtual bool equals (const Object *other) const
 Comparison of objects.
 
virtual String displayName () const
 Returns the display name of the object intended to present to a user.
 
virtual void printDiffInfo (DiffOperation operation, Object *other) const
 Output method for outputting the diff results for the diff algorithm.
 
void setHighBit (bool status) noexcept
 
bool highBit () const noexcept
 

Detailed Description

Compression class for DEFLATE-compressed data. The basis is RFC 1950 and RFC 1951. As of 2017-01-14, the own implementation was exchanged in favour of zlib.

Constructor & Destructor Documentation

◆ Deflater()

jm::Deflater::Deflater ( )

Constructor.

◆ ~Deflater()

jm::Deflater::~Deflater ( )
overridedefault

Constructor.

Parameters
wrapStatus, whether zlib header and CRC are omitted

Destructor

Member Function Documentation

◆ deflate()

void jm::Deflater::deflate ( uint8 *&  buffer,
size_t &  length 
)

This method compresses the data in the buffer \discussion Both parameters are output values and are initialised by this method. The caller must clean up the array himself afterwards.

Parameters
bufferThe buffer into which the data is to be written.
lengthBuffer length

◆ reset()

void jm::Deflater::reset ( )

Resets the compressor so that a new object can be compressed.

◆ setInput()

void jm::Deflater::setInput ( uint8 *  buffer,
size_t  length 
)

Gives this class a block of bytes to compress.

Parameters
bufferUncompressed data
lengthData length

◆ totalInSize()

size_t jm::Deflater::totalInSize ( ) const

Returns the total number of bytes of the uncompressed input.

◆ totalOutSize()

size_t jm::Deflater::totalOutSize ( ) const

Returns the total number of bytes of the compressed output.