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

Classes

struct  LFH_Copier
 

Public Member Functions

 ArchiveFile_Zip (const PFile &file, off_t ofs, off_t csize, u32 checksum, ZipMethod method)
 
virtual size_t Precedence () const
 
virtual wchar_t LocationCode () const
 
virtual OsPath Path () const
 
virtual Status Load (const OsPath &name, const std::shared_ptr< u8 > &buf, size_t size) const
 
- Public Member Functions inherited from IFileLoader
virtual ~IFileLoader ()
 
virtual size_t Precedence () const =0
 
virtual wchar_t LocationCode () const =0
 
virtual OsPath Path () const =0
 
virtual Status Load (const OsPath &name, const std::shared_ptr< u8 > &buf, size_t size) const =0
 

Private Types

enum  Flags { NeedsFixup = 1 }
 

Private Member Functions

void AdjustOffset () const
 fix up m_ofs (adjust it to point to cdata instead of the LFH). More...
 

Private Attributes

PFile m_file
 
off_t m_ofs
 
off_t m_csize
 
u32 m_checksum
 
u16 m_method
 
u16 m_flags
 

Member Enumeration Documentation

◆ Flags

enum ArchiveFile_Zip::Flags
private
Enumerator
NeedsFixup 

Constructor & Destructor Documentation

◆ ArchiveFile_Zip()

ArchiveFile_Zip::ArchiveFile_Zip ( const PFile file,
off_t  ofs,
off_t  csize,
u32  checksum,
ZipMethod  method 
)
inline

Member Function Documentation

◆ AdjustOffset()

void ArchiveFile_Zip::AdjustOffset ( ) const
inlineprivate

fix up m_ofs (adjust it to point to cdata instead of the LFH).

note: we cannot use CDFH filename and extra field lengths to skip past LFH since that may not mirror CDFH (has happened).

this is called at file-open time instead of while mounting to reduce seeks: since reading the file will typically follow, the block cache entirely absorbs the IO cost.

◆ Load()

virtual Status ArchiveFile_Zip::Load ( const OsPath name,
const std::shared_ptr< u8 > &  buf,
size_t  size 
) const
inlinevirtual

Implements IFileLoader.

◆ LocationCode()

virtual wchar_t ArchiveFile_Zip::LocationCode ( ) const
inlinevirtual

Implements IFileLoader.

◆ Path()

virtual OsPath ArchiveFile_Zip::Path ( ) const
inlinevirtual

Implements IFileLoader.

◆ Precedence()

virtual size_t ArchiveFile_Zip::Precedence ( ) const
inlinevirtual

Implements IFileLoader.

Member Data Documentation

◆ m_checksum

u32 ArchiveFile_Zip::m_checksum
private

◆ m_csize

off_t ArchiveFile_Zip::m_csize
private

◆ m_file

PFile ArchiveFile_Zip::m_file
private

◆ m_flags

u16 ArchiveFile_Zip::m_flags
mutableprivate

◆ m_method

u16 ArchiveFile_Zip::m_method
private

◆ m_ofs

off_t ArchiveFile_Zip::m_ofs
mutableprivate

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