EZGZipFile Class Reference

#include <ezgzip.h>

Link against: ezlib.lib

class EZGZipFile
Public Attributes
const TUint8ID1
const TUint8ID2
Public Member Enumerations
enumanonymous { ENotGZipFile, EInvalidCompressionMethod, EBadGZipHeader, EBadGZipTrailer, EBadGZipCrc }
enumanonymous { EFText, EFHcrc, EFExtra, EFName, EFComment }
Public Member Functions
IMPORT_C TBoolIsGzipFile(RFs &, const TDesC &)
IMPORT_C TBoolIsGzipFileL(RFs &, const TDesC &)
IMPORT_C voidLocateAndReadTrailerL(RFs &, const TDesC &, TEZGZipTrailer &)
IMPORT_C voidReadHeaderL(RFile &, TEZGZipHeader &)
IMPORT_C voidReadTrailerL(RFile &, TEZGZipTrailer &)
IMPORT_C voidWriteHeaderL(RFile &, TEZGZipHeader &)
IMPORT_C voidWriteTrailerL(RFile &, TEZGZipTrailer &)

Detailed Description

The EZGZipFile class handles writing / reading of headers and trailers to / from zip files

Member Attribute Documentation

ID1

const TUint8ID1[static]

First of the header ID pair

ID2

const TUint8ID2[static]

Second of the header ID pair

Member Enumeration Documentation

Enum anonymous

Zip file error codes

EnumeratorValueDescription
ENotGZipFileKEZlibErrNotGZipFile
EInvalidCompressionMethodKEZlibErrInvalidCompression
EBadGZipHeaderKEZlibErrBadGZipHeader
EBadGZipTrailerKEZlibErrBadGZipTrailer
EBadGZipCrcKEZlibErrBadGZipCrc

Enum anonymous

Flags to determine which part of the header / trailer is being written

EnumeratorValueDescription
EFText0
EFHcrc1
EFExtra2
EFName3
EFComment4

Member Function Documentation

IsGzipFile ( RFs &, const TDesC & )

IMPORT_C TBoolIsGzipFile(RFs &aRfs,
const TDesC &aFname
)[static]

DeprecatedInterface is deprecated because it is unsafe as it may leave. It is available for backward compatibility reasons only.

See also: EZGZipFile::IsGzipFileL

IsGzipFileL ( RFs &, const TDesC & )

IMPORT_C TBoolIsGzipFileL(RFs &aRfs,
const TDesC &aFname
)[static]

Determine if the given file is a valid zip file

Parameters
aRfsfile server session
aFnamename of the file to check
Return Value
ETrue if the file is valid zip file, EFalse otherwise
Leave Codes
...Any of the system wide error codes

LocateAndReadTrailerL ( RFs &, const TDesC &, TEZGZipTrailer & )

IMPORT_C voidLocateAndReadTrailerL(RFs &aRfs,
const TDesC &aFname,
TEZGZipTrailer &aTrailer
)[static]

Find the zip trailer within the specified file, and read it into the TEZGZipTrailer object

Parameters
aRfsfile server session
aFnamethe file to read from
aTrailerthe target trailer object
Leave Codes
KEZlibErrBadGZipHeaderInvalid zip header
...Any of the system wide error codes

ReadHeaderL ( RFile &, TEZGZipHeader & )

IMPORT_C voidReadHeaderL(RFile &aFile,
TEZGZipHeader &aHeader
)[static]

Read the zip header from the specified zip file into the TEZGZipHeader object

Parameters
aFilethe zip file to read from
aHeaderthe target header object
Leave Codes
KEZlibErrBadGZipHeaderinvalid zip header
...Any of the system wide error codes

ReadTrailerL ( RFile &, TEZGZipTrailer & )

IMPORT_C voidReadTrailerL(RFile &aFile,
TEZGZipTrailer &aTrailer
)[static]

Read the zip trailer from the specified zip file into the TEZGZipTrailer object

Parameters
aFilethe zip file to read from
aTrailerthe target trailer object
Leave Codes
KEZlibErrBadGZipTrailerinvalid zip trailer
...Any of the system wide error codes

WriteHeaderL ( RFile &, TEZGZipHeader & )

IMPORT_C voidWriteHeaderL(RFile &aFile,
TEZGZipHeader &aHeader
)[static]

Write the zip header to the specified file

Parameters
aFilethe file to write to
aHeaderthe header object to write to the file
Leave Codes
...Any of the system wide error codes

WriteTrailerL ( RFile &, TEZGZipTrailer & )

IMPORT_C voidWriteTrailerL(RFile &aFile,
TEZGZipTrailer &aTrailer
)[static]

Write the zip trailer to the specified file

Parameters
aFilethe file to write to
aTrailerthe trailer object to write to the file
Leave Codes
...Any of the system wide error codes