![]() |
XII Release 0.1.0
|
A utility class for reading from xiiArchive files. More...
#include <ArchiveReader.h>
Public Member Functions | |
xiiResult | OpenArchive (xiiStringView sPath) |
Opens the given file and validates that it is a valid archive file. | |
const xiiArchiveTOC & | GetArchiveTOC () |
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< xiiStreamReader > | CreateEntryReader (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 |
A utility class for reading from xiiArchive files.
xiiResult xiiArchiveReader::ExtractAllFiles | ( | xiiStringView | sTargetFolder | ) | const |
Extracts all files to the target folder.
Calls ExtractNextFileCallback() for every file that is being extracted.
xiiResult xiiArchiveReader::ExtractFile | ( | xiiUInt32 | uiEntryIdx, |
xiiStringView | sTargetFolder ) const |
Extracts the given entry to the target folder.
Calls ExtractFileProgressCallback() to report progress.