XII Release 0.1.0
Loading...
Searching...
No Matches
xiiArchiveReader Class Reference

A utility class for reading from xiiArchive files. More...

#include <ArchiveReader.h>

Inheritance diagram for xiiArchiveReader:
[legend]

Public Member Functions

xiiResult OpenArchive (xiiStringView sPath)
 Opens the given file and validates that it is a valid archive file.
 
const xiiArchiveTOCGetArchiveTOC ()
 Returns the table-of-contents for the previously opened archive.
 
xiiResult ExtractFile (xiiUInt32 uiEntryIdx, xiiStringView sTargetFolder) const
 Extracts the given entry to the target folder.
 
xiiResult ExtractAllFiles (xiiStringView sTargetFolder) const
 Extracts all files to the target folder.
 
void ConfigureRawMemoryStreamReader (xiiUInt32 uiEntryIdx, xiiRawMemoryStreamReader &ref_memReader) const
 Sets up memReader for reading the raw (potentially compressed) data that is stored for the given entry in the archive.
 
xiiUniquePtr< xiiStreamReaderCreateEntryReader (xiiUInt32 uiEntryIdx) const
 Creates a reader that will decompress the given file entry.
 

Protected Member Functions

virtual bool ExtractNextFileCallback (xiiUInt32 uiCurEntry, xiiUInt32 uiMaxEntries, xiiStringView sSourceFile) const
 Called by ExtractAllFiles() for progress reporting. Return false to abort.
 
virtual bool ExtractFileProgressCallback (xiiUInt64 bytesWritten, xiiUInt64 bytesTotal) const
 Called by ExtractFile() for progress reporting. Return false to abort.
 

Protected Attributes

xiiMemoryMappedFile m_MemFile
 
xiiArchiveTOC m_ArchiveTOC
 
xiiUInt8 m_uiArchiveVersion = 0
 
const void * m_pDataStart = nullptr
 
xiiUInt64 m_uiMemFileSize = 0
 

Detailed Description

A utility class for reading from xiiArchive files.

Member Function Documentation

◆ ExtractAllFiles()

xiiResult xiiArchiveReader::ExtractAllFiles ( xiiStringView sTargetFolder) const

Extracts all files to the target folder.

Calls ExtractNextFileCallback() for every file that is being extracted.

◆ ExtractFile()

xiiResult xiiArchiveReader::ExtractFile ( xiiUInt32 uiEntryIdx,
xiiStringView sTargetFolder ) const

Extracts the given entry to the target folder.

Calls ExtractFileProgressCallback() to report progress.


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