Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
Wrapper for the inflate algorithm. More...
#include <compression.hh>
Public Member Functions | |
Decompress (void) | |
Initialize the inflate algorithm state. | |
~Decompress (void) | |
Free algorithm state resources. | |
void | input (uint1 *buffer, int4 sz) |
Provide the next sequence of compressed bytes. | |
bool | isFinished (void) const |
Return if end of compressed stream is reached. | |
int4 | inflate (uint1 *buffer, int4 sz) |
Inflate as much as possible into given buffer. | |
Private Attributes | |
z_stream | compStream |
The zlib inflate algorithm state. | |
bool | streamFinished |
Set to true if the end of the compressed stream has been reached. | |
Wrapper for the inflate algorithm.
Initialize/free algorithm resources. Provide successive arrays of compressed bytes via the input() method. Compute successive arrays of uncompressed bytes via the inflate() method.
int4 ghidra::Decompress::inflate | ( | uint1 * | buffer, |
int4 | sz | ||
) |
Inflate as much as possible into given buffer.
Return the number of bytes of output space still available. Output may be limited by the amount of space in the output buffer or the amount of data available in the current input buffer.
buffer | is where uncompressed bytes are stored |
sz | is the size, in bytes, of the buffer |
References compStream, inflate(), and streamFinished.
Referenced by inflate(), and ghidra::sla::FormatDecode::ingestStream().
|
inline |
Provide the next sequence of compressed bytes.
buffer | is a pointer to the compressed bytes |
sz | is the number of bytes |
References compStream.
Referenced by ghidra::sla::FormatDecode::ingestStream().