ClanLib  2.3.7
List of all members
CL_ZipReader Class Reference

Zip file reader. More...

#include <zip_reader.h>

Public Member Functions

Construction
 CL_ZipReader (CL_IODevice &input)
 Constructs a ZipReader. More...
 
Operations
bool read_local_file_header (bool allow_data_descriptor=false)
 Begins reading a file entry in the zip file. More...
 
CL_String get_filename ()
 Returns the file name that was stored in the local file header. More...
 
bool has_data_descriptor () const
 Returns true if the file entry is followed by a data descriptor. More...
 
cl_byte64 get_compressed_size () const
 Returns the compressed size of the file entry. More...
 
cl_byte64 get_uncompressed_size () const
 Returns the uncompressed size of the file entry. More...
 
void set_data_descriptor_data (cl_byte64 compressed_size, cl_byte64 uncompressed_size, cl_ubyte32 crc32)
 Informs the zip reader what the data descriptor contains. More...
 
cl_byte64 read_file_data (void *data, cl_byte64 size, bool read_all=true)
 Reads some file data from the zip file. More...
 

Detailed Description

Zip file reader.

Constructor & Destructor Documentation

CL_ZipReader::CL_ZipReader ( CL_IODevice input)

Constructs a ZipReader.

Parameters
input= IODevice

Member Function Documentation

cl_byte64 CL_ZipReader::get_compressed_size ( ) const

Returns the compressed size of the file entry.

CL_String CL_ZipReader::get_filename ( )

Returns the file name that was stored in the local file header.

cl_byte64 CL_ZipReader::get_uncompressed_size ( ) const

Returns the uncompressed size of the file entry.

bool CL_ZipReader::has_data_descriptor ( ) const

Returns true if the file entry is followed by a data descriptor.

cl_byte64 CL_ZipReader::read_file_data ( void *  data,
cl_byte64  size,
bool  read_all = true 
)

Reads some file data from the zip file.

bool CL_ZipReader::read_local_file_header ( bool  allow_data_descriptor = false)

Begins reading a file entry in the zip file.

If allow_data_descriptor is set to false, an exception will be thrown if the file entry sizes and crc32 values are written in a data descriptor instead of the local file header.

Returns false if there are no more file entries.

void CL_ZipReader::set_data_descriptor_data ( cl_byte64  compressed_size,
cl_byte64  uncompressed_size,
cl_ubyte32  crc32 
)

Informs the zip reader what the data descriptor contains.


The documentation for this class was generated from the following file: