System.ZLib.ZDecompress
Delphi
procedure ZDecompress(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer);
procedure ZDecompress(const inBuffer: TBytes; out outBuffer: TBytes; outEstimate: Integer);
C++
extern DELPHI_PACKAGE void __fastcall ZDecompress(const void * inBuffer, int inSize, /* out */ void * &outBuffer, /* out */ int &outSize, int outEstimate = 0x0)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.ZLib.pas System.ZLib.hpp |
System.ZLib | System.ZLib |
Description
ZDecompress decompresses the source buffer specified by inBuffer
into the destination buffer specified by outBuffer
.
inSize
represents the size (in bytes) of the source buffer inBuffer
. outBuffer
must not be allocated. level
represents the level of compression. The function call modifies the outBuffer
and outSize
parameters. outBuffer
will point to the decompressed data, and outSize
will represent the size (in bytes) of the decompressed data.
ZDecompress may raise an EZDecompressionError.
See sample:
function myDecompress(input: Pointer; inputSize: Integer): Pointer;
var
outPut: Pointer;
outSize: Integer;
begin
ZDecompress(input, inputSize, outPut, outSize);
Result := outPut;
end;