![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java JavaScript Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Delphi DLL) Check if a File is in Gzip FormatSee more Gzip ExamplesThis example demonstrates how to use the The method inspects the contents of the specified file and returns If the method fails (for example, if the file does not exist or cannot be accessed), the
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 gzip: HCkGzip; filePath: PWideChar; isGzip: Boolean; begin // This example demonstrates how to determine if a file is in Gzip format. gzip := CkGzip_Create(); // The file to examine: filePath := 'test.gz'; // Check if the file is a valid Gzip file: isGzip := CkGzip_ExamineFile(gzip,filePath); if (isGzip = True) then begin Memo1.Lines.Add('The file is a valid Gzip file.'); end else begin Memo1.Lines.Add('The file isnot a Gzip file.'); end; CkGzip_Dispose(gzip); end; |
||||
© 2000-2026 Chilkat Software, Inc. All Rights Reserved.