Pyrogenesis  trunk
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ArchiveFile_Zip Class Reference
Inheritance diagram for ArchiveFile_Zip:
Inheritance graph
[legend]
Collaboration diagram for ArchiveFile_Zip:
Collaboration graph
[legend]

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 shared_ptr< u8 > &buf, size_t size) const
 
- Public Member Functions inherited from IFileLoader
virtual ~IFileLoader ()
 

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

enum ArchiveFile_Zip::Flags
private
Enumerator
NeedsFixup 

Constructor & Destructor Documentation

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

Member Function Documentation

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.

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

Implements IFileLoader.

virtual wchar_t ArchiveFile_Zip::LocationCode ( ) const
inlinevirtual

Implements IFileLoader.

virtual OsPath ArchiveFile_Zip::Path ( ) const
inlinevirtual

Implements IFileLoader.

virtual size_t ArchiveFile_Zip::Precedence ( ) const
inlinevirtual

Implements IFileLoader.

Member Data Documentation

u32 ArchiveFile_Zip::m_checksum
private
off_t ArchiveFile_Zip::m_csize
private
PFile ArchiveFile_Zip::m_file
private
u16 ArchiveFile_Zip::m_flags
mutableprivate
u16 ArchiveFile_Zip::m_method
private
off_t ArchiveFile_Zip::m_ofs
mutableprivate

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