EZGZipFile Class Reference

class EZGZipFile

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

Public Member Functions
IMPORT_C TBool IsGzipFile ( RFs &, const TDesC &)
IMPORT_C TBool IsGzipFileL ( RFs &, const TDesC &)
IMPORT_C void LocateAndReadTrailerL ( RFs &, const TDesC &, TEZGZipTrailer &)
IMPORT_C void ReadHeaderL ( RFile &, TEZGZipHeader &)
IMPORT_C void ReadTrailerL ( RFile &, TEZGZipTrailer &)
IMPORT_C void WriteHeaderL ( RFile &, TEZGZipHeader &)
IMPORT_C void WriteTrailerL ( RFile &, TEZGZipTrailer &)
Private Member Functions
void ReadStringIntoDescriptorL ( RFile &, HBufC8 **)
Public Attributes
const TUint8 ID1
const TUint8 ID2

Member Functions Documentation

IsGzipFile(RFs &, const TDesC &)

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

Interface is deprecated because it is unsafe as it may leave. It is available for backward compatibility reasons only. EZGZipFile::IsGzipFileL

Parameters

RFs & aRfs
const TDesC & aFname

IsGzipFileL(RFs &, const TDesC &)

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

Determine if the given file is a valid zip file

leave
... Any of the system wide error codes

Parameters

RFs & aRfs file server session
const TDesC & aFname name of the file to check

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

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

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

leave
KEZlibErrBadGZipHeader Invalid zip header
leave
... Any of the system wide error codes

Parameters

RFs & aRfs file server session
const TDesC & aFname the file to read from
TEZGZipTrailer & aTrailer the target trailer object

ReadHeaderL(RFile &, TEZGZipHeader &)

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

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

leave
KEZlibErrBadGZipHeader invalid zip header
leave
... Any of the system wide error codes

Parameters

RFile & aFile the zip file to read from
TEZGZipHeader & aHeader the target header object

ReadStringIntoDescriptorL(RFile &, HBufC8 **)

void ReadStringIntoDescriptorL ( RFile & aFile,
HBufC8 ** aDes
) [private, static]

Parameters

RFile & aFile
HBufC8 ** aDes

ReadTrailerL(RFile &, TEZGZipTrailer &)

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

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

leave
KEZlibErrBadGZipTrailer invalid zip trailer
leave
... Any of the system wide error codes

Parameters

RFile & aFile the zip file to read from
TEZGZipTrailer & aTrailer the target trailer object

WriteHeaderL(RFile &, TEZGZipHeader &)

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

Write the zip header to the specified file

leave
... Any of the system wide error codes

Parameters

RFile & aFile the file to write to
TEZGZipHeader & aHeader the header object to write to the file

WriteTrailerL(RFile &, TEZGZipTrailer &)

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

Write the zip trailer to the specified file

leave
... Any of the system wide error codes

Parameters

RFile & aFile the file to write to
TEZGZipTrailer & aTrailer the trailer object to write to the file

Member Data Documentation

const TUint8 ID1

const TUint8 ID1 [static]

First of the header ID pair

const TUint8 ID2

const TUint8 ID2 [static]

Second of the header ID pair