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

Decompression class for DEFLATE-compressed data. Basis are RFC 1950 and RFC 1951. More...

Inheritance diagram for jm::Inflater:
jm::Object

Public Member Functions

 Inflater ()
 Constructor.
 
 Inflater (bool wrap)
 Constructor.
 
 ~Inflater () override=default
 Destructor.
 
void SetInput (uint8 *buffer, size_t length)
 Passes a block of bytes to this class for decompression.
 
bool NeedsInput ()
 Returns true if the end of the input block has been reached, but the end of the input stream has not been reached yet.
 
bool Finished ()
 Returns true if the end of the input stream has been reached.
 
void Inflate (uint8 *&buffer, size_t &length)
 This method decompresses the data into the buffer. \discussion Both parameters are output values and will be initialized by this method. The caller must clean up the array afterwards.
 
void Reset ()
 Resets the decompressor, allowing a new object to be decompressed.
 
size_t GetRemaining ()
 Returns the number of remaining bytes in the input buffer.
 
size_t GetTotalIn ()
 Returns the total number of bytes in the compressed input.
 
size_t GetTotalOut ()
 Returns the total number of bytes of the decompressed 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

Decompression class for DEFLATE-compressed data. Basis are RFC 1950 and RFC 1951.

Constructor & Destructor Documentation

◆ Inflater() [1/2]

jm::Inflater::Inflater ( )

Constructor.

◆ Inflater() [2/2]

jm::Inflater::Inflater ( bool  wrap)
explicit

Constructor.

Parameters
wrapStatus, if zlib-Header and CRC is omitted.

◆ ~Inflater()

jm::Inflater::~Inflater ( )
overridedefault

Destructor.

Member Function Documentation

◆ Finished()

bool jm::Inflater::Finished ( )

Returns true if the end of the input stream has been reached.

◆ GetRemaining()

size_t jm::Inflater::GetRemaining ( )

Returns the number of remaining bytes in the input buffer.

Returns
The number of remaining bytes.

◆ GetTotalIn()

size_t jm::Inflater::GetTotalIn ( )

Returns the total number of bytes in the compressed input.

Returns
The total number of bytes.

◆ GetTotalOut()

size_t jm::Inflater::GetTotalOut ( )

Returns the total number of bytes of the decompressed output.

Returns
The total number of bytes.

◆ Inflate()

void jm::Inflater::Inflate ( uint8 *&  buffer,
size_t &  length 
)

This method decompresses the data into the buffer. \discussion Both parameters are output values and will be initialized by this method. The caller must clean up the array afterwards.

Parameters
bufferThe buffer to write the data into.
lengthThe length of the buffer.

◆ NeedsInput()

bool jm::Inflater::NeedsInput ( )

Returns true if the end of the input block has been reached, but the end of the input stream has not been reached yet.

◆ Reset()

void jm::Inflater::Reset ( )

Resets the decompressor, allowing a new object to be decompressed.

◆ SetInput()

void jm::Inflater::SetInput ( uint8 *  buffer,
size_t  length 
)

Passes a block of bytes to this class for decompression.

Parameters
bufferThe compressed data
lengthThe length of the data