KittyMemoryEx 1.0.0
Dedicated library for runtime code patching, memory scanning, tracing, injection and some more useful memory utilities. works for both Android and Linux
Loading...
Searching...
No Matches
KittyUtils::Zip Namespace Reference

Provides utility functions for handling ZIP files. More...

Classes

struct  CentralDirectoryInfo
 Structure to hold ZIP Central Directory info. More...
struct  ZipEntryInfo
 Structure to hold ZIP entry info. More...
struct  ZipEntryMMap
 Structure to hold memory mapped ZIP entry info. More...

Functions

bool findCentralDirectory (const uint8_t *data, uint64_t fileSize, CentralDirectoryInfo *info)
 Finds the central directory of a ZIP file.
std::vector< ZipEntryInfo > listEntriesInZip (const std::string &zipPath)
 Lists all entries in a ZIP file.
bool findEntryInfoByDataOffset (const std::string &zipPath, uint64_t dataOffset, ZipEntryInfo *out)
 Finds the ZipEntryInfo for an entry by its data offset.
bool mmapEntryByDataOffset (const std::string &zipPath, uint64_t dataOffset, ZipEntryMMap *out)
 Maps an entry in a ZIP file by its data offset.

Detailed Description

Provides utility functions for handling ZIP files.

Function Documentation

◆ findCentralDirectory()

bool KittyUtils::Zip::findCentralDirectory ( const uint8_t * data,
uint64_t fileSize,
CentralDirectoryInfo * info )

Finds the central directory of a ZIP file.

Parameters
dataPointer to the ZIP file data.
fileSizeSize of the ZIP file in bytes.
infoPointer to store the central directory info.
Returns
True if the central directory is found, false otherwise.

◆ findEntryInfoByDataOffset()

bool KittyUtils::Zip::findEntryInfoByDataOffset ( const std::string & zipPath,
uint64_t dataOffset,
ZipEntryInfo * out )

Finds the ZipEntryInfo for an entry by its data offset.

Parameters
zipPathPath to the ZIP file.
dataOffsetOffset of the entry in the ZIP file.
outPointer to store the ZipEntryInfo object if found.
Returns
True if the entry info is found, false otherwise.

◆ listEntriesInZip()

std::vector< ZipEntryInfo > KittyUtils::Zip::listEntriesInZip ( const std::string & zipPath)

Lists all entries in a ZIP file.

Parameters
zipPathPath to the ZIP file.
Returns
A vector of ZipEntryInfo objects containing information about each entry.

◆ mmapEntryByDataOffset()

bool KittyUtils::Zip::mmapEntryByDataOffset ( const std::string & zipPath,
uint64_t dataOffset,
ZipEntryMMap * out )

Maps an entry in a ZIP file by its data offset.

Parameters
zipPathPath to the ZIP file.
dataOffsetOffset of the entry in the ZIP file.
outPointer to store the ZipEntryMMap object if found.
Returns
True if the entry is mapped, false otherwise.