Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::IO::ZipDir::Cache Class Reference

Inherits AZStd::intrusive_base.

Public Member Functions

 AZ_CLASS_ALLOCATOR (Cache, AZ::SystemAllocator)
 
bool IsValid () const
 
ErrorEnum UpdateFile (AZStd::string_view szRelativePath, const void *pUncompressed, uint64_t nSize, uint32_t nCompressionMethod=ZipFile::METHOD_STORE, int nCompressionLevel=-1, CompressionCodec::Codec codec=CompressionCodec::Codec::ZLIB)
 
ErrorEnum StartContinuousFileUpdate (AZStd::string_view szRelativePath, uint64_t nSize)
 
ErrorEnum UpdateFileContinuousSegment (AZStd::string_view szRelativePath, uint64_t nSize, const void *pUncompressed, uint64_t nSegmentSize, uint64_t nOverwriteSeekPos)
 
ErrorEnum UpdateFileCRC (AZStd::string_view szRelativePath, AZ::Crc32 dwCRC32)
 
ErrorEnum RemoveFile (AZStd::string_view szRelativePath)
 
ErrorEnum RemoveDir (AZStd::string_view szRelativePath)
 
ErrorEnum RemoveAll ()
 
void Close ()
 
FileEntryFindFile (AZStd::string_view szPath, bool bFullInfo=false)
 
ErrorEnum ReadFile (FileEntry *pFileEntry, void *pCompressed, void *pUncompressed)
 
void Free (void *ptr)
 
ErrorEnum Refresh (FileEntryBase *pFileEntry)
 
bool IsOwnerOf (const FileEntry *pFileEntry) const
 
AZ::IO::PathView GetFilePath () const
 
FileEntryTreeGetRoot ()
 
bool WriteCDR ()
 
bool WriteCDR (AZ::IO::HandleType fTarget)
 
bool RelinkZip ()
 

Static Public Attributes

static constexpr size_t g_nSizeRelinkBuffer = 1024 * 1024
 
static constexpr size_t g_nMaxItemsRelinkBuffer = 128
 
static constexpr int compressedBlockHeaderSizeInBytes = 4
 

Protected Types

enum  { FLAGS_UNCOMPACTED = 1 << 0 , FLAGS_CDR_DIRTY = 1 << 1 , FLAGS_READ_ONLY = 1 << 2 , FLAGS_DONT_COMPACT = 1 << 3 }
 

Protected Member Functions

bool RelinkZip (AZ::IO::HandleType fTmp)
 
bool WriteZipFiles (AZStd::vector< AZStd::intrusive_ptr< FileDataRecord > > &queFiles, AZ::IO::HandleType fTmp)
 
bool WriteCompressedData (uint8_t *data, size_t size, bool encrypt)
 
bool WriteNullData (size_t size)
 
ZipFile::CryCustomEncryptionHeaderGetEncryptionHeader ()
 
ZipFile::CrySignedCDRHeaderGetSignedHeader ()
 
ZipFile::CryCustomExtendedHeaderGetExtendedHeader ()
 
size_t GetCompressedSizeEstimate (size_t uncompressedSize, CompressionCodec::Codec codec)
 

Protected Attributes

FileEntryTree m_treeDir
 
AZ::IO::HandleType m_fileHandle = AZ::IO::InvalidHandle
 
AZ::IO::Path m_strFilePath
 
AZStd::unordered_set< AZ::IO::Path > m_relativePathPool
 
uint32_t m_lCDROffset = 0
 
uint32_t m_nFlags = 0
 
AZStd::vector< uint8_t > m_CDR_buffer
 
ZipFile::EHeaderEncryptionType m_encryptedHeaders = ZipFile::HEADERS_NOT_ENCRYPTED
 
ZipFile::EHeaderSignatureType m_signedHeaders
 
ZipFile::CryCustomEncryptionHeader m_headerEncryption
 
ZipFile::CrySignedCDRHeader m_headerSignature
 
ZipFile::CryCustomExtendedHeader m_headerExtended
 

Friends

class CacheFactory
 
class FileEntryTransactionAdd
 

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