Sample code for 30+ languages & platforms
Delphi DLL

GZip Decompress File

See more Gzip Examples

Demonstrates how to uncompress a .gz compressed file to get the uncompressed original file.

Chilkat Delphi DLL Downloads

Delphi DLL
uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Gzip;

...

procedure TForm1.Button1Click(Sender: TObject);
var
success: Boolean;
gzip: HCkGzip;

begin
success := False;

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

gzip := CkGzip_Create();

success := CkGzip_UncompressFile(gzip,'qa_data/gzip/something.csv.gz','qa_output/something.csv');
if (success <> True) then
  begin
    Memo1.Lines.Add(CkGzip__lastErrorText(gzip));
    Exit;
  end;

Memo1.Lines.Add('File successfully uncompressed and extracted from the Gzip compressed format.');

CkGzip_Dispose(gzip);

end;