EZGZipFile Class Reference

class EZGZipFile

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

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 &)
Private Member Functions
voidReadStringIntoDescriptorL(RFile &, HBufC8 **)
Public Attributes
const TUint8ID1
const TUint8ID2

Member Functions Documentation

IsGzipFile(RFs &, const TDesC &)

IMPORT_C TBoolIsGzipFile(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 TBoolIsGzipFileL(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 & aRfsfile server session
const TDesC & aFnamename of the file to check

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

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

Parameters

RFs & aRfsfile server session
const TDesC & aFnamethe file to read from
TEZGZipTrailer & aTrailerthe target trailer object

ReadHeaderL(RFile &, TEZGZipHeader &)

IMPORT_C voidReadHeaderL(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 & aFilethe zip file to read from
TEZGZipHeader & aHeaderthe target header object

ReadStringIntoDescriptorL(RFile &, HBufC8 **)

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

Parameters

RFile & aFile
HBufC8 ** aDes

ReadTrailerL(RFile &, TEZGZipTrailer &)

IMPORT_C voidReadTrailerL(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 & aFilethe zip file to read from
TEZGZipTrailer & aTrailerthe target trailer object

WriteHeaderL(RFile &, TEZGZipHeader &)

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

Write the zip header to the specified file

leave
... Any of the system wide error codes

Parameters

RFile & aFilethe file to write to
TEZGZipHeader & aHeaderthe header object to write to the file

WriteTrailerL(RFile &, TEZGZipTrailer &)

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

Write the zip trailer to the specified file

leave
... Any of the system wide error codes

Parameters

RFile & aFilethe file to write to
TEZGZipTrailer & aTrailerthe trailer object to write to the file

Member Data Documentation

const TUint8 ID1

const TUint8ID1[static]

First of the header ID pair

const TUint8 ID2

const TUint8ID2[static]

Second of the header ID pair