Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
ArchiveReader_Zip Class Reference
Inheritance diagram for ArchiveReader_Zip:
Collaboration diagram for ArchiveReader_Zip:

Public Member Functions

 ArchiveReader_Zip (const OsPath &pathname)
 
virtual Status ReadEntries (ArchiveEntryCallback cb, uintptr_t cbData)
 
- Public Member Functions inherited from IArchiveReader
virtual ~IArchiveReader ()
 
virtual Status ReadEntries (ArchiveEntryCallback cb, uintptr_t cbData)=0
 

Static Private Member Functions

static const u8FindRecord (const u8 *buf, size_t size, const u8 *start, u32 magic, size_t recordSize)
 Scan buffer for a Zip file record. More...
 
static Status ScanForEcdr (const PFile &file, off_t fileSize, u8 *buf, size_t maxScanSize, size_t &cd_numEntries, off_t &cd_ofs, size_t &cd_size)
 
static Status LocateCentralDirectory (const PFile &file, off_t fileSize, off_t &cd_ofs, size_t &cd_numEntries, size_t &cd_size)
 

Private Attributes

PFile m_file
 
off_t m_fileSize
 

Additional Inherited Members

- Public Types inherited from IArchiveReader
typedef void(* ArchiveEntryCallback) (const VfsPath &pathname, const CFileInfo &fileInfo, PIArchiveFile archiveFile, uintptr_t cbData)
 called for each archive entry. More...
 

Constructor & Destructor Documentation

◆ ArchiveReader_Zip()

ArchiveReader_Zip::ArchiveReader_Zip ( const OsPath pathname)
inline

Member Function Documentation

◆ FindRecord()

static const u8 * ArchiveReader_Zip::FindRecord ( const u8 buf,
size_t  size,
const u8 start,
u32  magic,
size_t  recordSize 
)
inlinestaticprivate

Scan buffer for a Zip file record.

Parameters
buf
size
startposition within buffer
magicsignature of record
recordSizesize of record (including signature)
Returns
pointer to record within buffer or 0 if not found.

◆ LocateCentralDirectory()

static Status ArchiveReader_Zip::LocateCentralDirectory ( const PFile file,
off_t  fileSize,
off_t cd_ofs,
size_t &  cd_numEntries,
size_t &  cd_size 
)
inlinestaticprivate

◆ ReadEntries()

virtual Status ArchiveReader_Zip::ReadEntries ( ArchiveEntryCallback  cb,
uintptr_t  cbData 
)
inlinevirtual

Implements IArchiveReader.

◆ ScanForEcdr()

static Status ArchiveReader_Zip::ScanForEcdr ( const PFile file,
off_t  fileSize,
u8 buf,
size_t  maxScanSize,
size_t &  cd_numEntries,
off_t cd_ofs,
size_t &  cd_size 
)
inlinestaticprivate

Member Data Documentation

◆ m_file

PFile ArchiveReader_Zip::m_file
private

◆ m_fileSize

off_t ArchiveReader_Zip::m_fileSize
private

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