TZipper
Creates a .ZIP archive file.
Declaration
Source position: zipper.pp line 423
type
TZipper = class(TObject)
public
constructor Create;
destructor Destroy;
procedure ZipAllFiles;
procedure SaveToFile;
procedure SaveToStream;
procedure ZipFile(const aFileToBeZipped: RawByteString);
procedure ZipFile(const AZipFileName: RawByteString;
const aFileToBeZipped: RawByteString);
procedure ZipFiles(const AZipFileName: RawByteString;
FileList: TStrings);
procedure ZipFiles(const AZipFileName: RawByteString;
const FileList: Array of RawbyteString);
procedure ZipFiles(const aFileList: Array of RawbyteString);
procedure ZipFiles(FileList: TStrings);
procedure ZipFiles(const AZipFileName: RawByteString;
Entries: TZipFileEntries);
procedure ZipFiles(Entries: TZipFileEntries);
class procedure Zip(const AZipFileName: RawByteString;
const aFileToBeZipped: RawByteString);
class procedure Zip(const AZipFileName: RawByteString;
aFileList: Array of RawByteString);
class procedure Zip(const AZipFileName: RawByteString;
aFileList: TStrings);
procedure Clear;
procedure Terminate;
property BufferSize: LongWord; {rw}
property OnPercent: Integer; {rw}
property OnProgress: TProgressEvent; {rw}
property OnStartFile: TOnStartFileEvent; {rw}
property OnEndFile: TOnEndOfFileEvent; {rw}
property FileName: RawByteString; {rw}
property FileComment: AnsiString; {rw}
property Files: TStrings; {r}
property InMemSize: Int64; {rw}
property Entries: TZipFileEntries; {rw}
property Terminated: Boolean; {r}
property UseLanguageEncoding: Boolean; {rw}
end;
Properties
| Member |
Visibility |
Description |
| BufferSize |
public |
Buffer size used when reading and processing files. |
| Entries |
public |
Collection with the TZipFileEntry instances in the .ZIP archive. |
| FileComment |
public |
Comment stored in the .ZIP archive file. |
| FileName |
public |
Name of the .ZIP archive file where the compressed files and directories are stored. |
| Files read only |
public |
Provides access to the list of files and directories in the archive. |
| InMemSize |
public |
Total memory used for the compressed content in the .ZIP file. |
| Terminated read only |
public |
True if the Terminate method has been called. |
| UseLanguageEncoding |
public |
Use language encoding. |
See all PropertiesMethods
| Member |
Visibility |
Description |
| Clear |
public |
Removes all values in the Entries and Files properties. |
| Create |
public |
Constructor for the class instance. |
| Destroy |
public |
Destructor for the class instance. |
| SaveToFile |
public |
Saves the archive to a file with a new name. |
| SaveToStream |
public |
Save the archive to a stream. |
| Terminate |
public |
Halts an assigned compressor in the class instance, and sets Terminated to True. |
| Zip |
public |
Convenience method used to create a .zip file with the given name containing the specified file(s). |
| ZipAllFiles |
public |
Zips all files in object and writes zip to disk. |
| ZipFile |
public |
Zip one file to a zip file. |
| ZipFiles |
public |
Zip multiple files into an archive. |
See all MethodsEvents
| Member |
Visibility |
Description |
| OnEndFile |
public |
Event handler signalled when compression for a file has been completed. |
| OnPercent |
public |
Threshold percentage which triggers progress notifications when processing files. |
| OnProgress |
public |
Event handler signalled to show a percent complete progress notifications. |
| OnStartFile |
public |
Event handler signalled when compression for a file is started. |
See all Events