25 #ifndef COMMON_ZIPFILE_H 26 #define COMMON_ZIPFILE_H 31 #include <boost/noncopyable.hpp> 39 class SeekableReadStream;
93 #endif // COMMON_ZIPFILE_H UString name
The file's name.
Internal file information.
A class holding an UTF-8 string.
ScopedPtr< SeekableReadStream > _zip
A simple scoped smart pointer template.
SeekableReadStream * getFile(uint32 index, bool tryNoCopy=false) const
Return a stream of the file's contents.
static SeekableReadStream * decompressFile(SeekableReadStream &zip, uint32 method, uint32 compSize, uint32 realSize)
const FileList & getFiles() const
Return the list of files.
ZipFile(SeekableReadStream *zip)
std::list< File > FileList
A class encapsulating ZIP file access.
uint32 size
The file's size.
Low-level type definitions to handle fixed width types portably.
A scoped plain pointer, allowing pointer-y access and normal deletion.
size_t getFileSize(uint32 index) const
Return the size of a file.
void load(SeekableReadStream &zip)
FileList _files
External list of file names and types.
IFileList _iFiles
Internal list of file offsets and sizes.
std::vector< IFile > IFileList
const IFile & getIFile(uint32 index) const
uint32 offset
The offset of the file within the ZIP.
void getFileProperties(SeekableReadStream &zip, const IFile &file, uint16 &compMethod, uint32 &compSize, uint32 &realSize) const
Interface for a seekable & readable data stream.
uint32 index
The file's local index within the ZIP.