Class TUnzipperStreamUtf8

Unit

Declaration

type TUnzipperStreamUtf8 = class(TUnZipper)

Description

Unzipping class with custom input stream that can extract a specific file

Hierarchy

Overview

Methods

Public constructor Create;
Public function UnzipFileToStream(AFilename: string; AStream: TStream; ACaseSensitive: boolean= true): boolean;
Public function UnzipFileToString(AFilename:string): string;
Protected procedure CustomCloseInput(Sender: TObject; var AStream: TStream);
Protected procedure CustomCloseOutput(Sender : TObject; var AStream : TStream; AItem : TFullZipFileEntry);
Protected procedure CustomCreateOutput(Sender : TObject; var AStream : TStream; AItem : TFullZipFileEntry);
Protected Procedure CustomOpenInput(Sender: TObject; var AStream: TStream);

Properties

Public property InputStream: TStream read FCustomInputStream write SetInputStream;

Description

Methods

Public constructor Create;

Creates the unzipper class. You need to set the InputStream ou Filename property afer that.

Public function UnzipFileToStream(AFilename: string; AStream: TStream; ACaseSensitive: boolean= true): boolean;

Unzips the specified item with the given filename into the given stream

Public function UnzipFileToString(AFilename:string): string;

Unzips the specified item with the given filename and return it as a string

Protected procedure CustomCloseInput(Sender: TObject; var AStream: TStream);

Callback method to close the ZIP input

Protected procedure CustomCloseOutput(Sender : TObject; var AStream : TStream; AItem : TFullZipFileEntry);

Callback method to close the output for the content of the extracted item

Protected procedure CustomCreateOutput(Sender : TObject; var AStream : TStream; AItem : TFullZipFileEntry);

Callback method to create the output for the content of the extracted item. This function actually just supplies the chosen output stream.

Protected Procedure CustomOpenInput(Sender: TObject; var AStream: TStream);

Callback method to open the ZIP input

Properties

Public property InputStream: TStream read FCustomInputStream write SetInputStream;

Input stream to use when unzipping, otherwise will use the inherited Filename property