Reads named entries out of one packed archive.
More...
#include <KUnzip.h>
|
| (instancetype) | - initWithPath: |
| | Opens an archive at a path.
|
| (instancetype) | - initWithPath:tail: |
| | Opens an archive at a path, skipping a fixed-size trailer.
|
| (instancetype) | - initWithData:range: |
| | Opens an archive held in memory over a byte range.
|
| (BOOL) | - fileExists: |
| | Reports whether the archive contains an entry with the given name.
|
| (NSUInteger) | - uncompressedSize: |
| | Returns the uncompressed size of a named entry.
|
| (nullable NSArray< NSString * > *) | - fileList |
| | Lists the names of every entry in the archive.
|
| (nullable NSMutableData *) | - uncompress: |
| | Reads one entry out of the archive.
|
|
|
NSFileHandle * | fileHandle |
| | The file handle a file-handle-backed archive reads through; set by its open callback.
|
|
NSData * | data |
| | The bytes a memory-backed archive reads from.
|
|
NSUInteger | dataCurrentPos |
| | The current read position of a memory-backed archive within data.
|
|
NSRange | dataRange |
| | The byte range of the backing store the archive occupies.
|
Reads named entries out of one packed archive.
◆ fileExists:
| - (BOOL) fileExists: |
|
(nullable NSString *) | name |
|
Reports whether the archive contains an entry with the given name.
- Parameters
-
| name | The entry's name; matched case-insensitively. |
- Returns
- YES when the entry exists, NO otherwise.
- Ghidra address:
- 0x76b3c
◆ fileList
| - (NSArray< NSString * > *) fileList |
|
|
|
Lists the names of every entry in the archive.
- Returns
- An array of the entries' names, or nil when the archive is empty or cannot be walked.
- Ghidra address:
- 0x76c70
◆ initWithData:range:
| - (instancetype) initWithData: |
|
(nullable NSData *) | data |
| range: |
|
(NSRange) | range |
Opens an archive held in memory over a byte range.
-[StoreDownloadManager downloaderFinished:] passes the downloaded pack's data and its full range. Reads through a memory-backed I/O set.
- Parameters
-
| data | The archive bytes. |
| range | The range of data the archive occupies. |
- Returns
- The opened archive, or nil when
range falls outside data or the archive cannot be opened.
- Ghidra address:
- 0x766cc
◆ initWithPath:
| - (instancetype) initWithPath: |
|
(nullable NSString *) | path |
|
Opens an archive at a path.
- Parameters
-
- Returns
- The opened archive, or nil when the archive cannot be opened.
- Ghidra address:
- 0x760a0
◆ initWithPath:tail:
| - (instancetype) initWithPath: |
|
(nullable NSString *) | path |
| tail: |
|
(NSUInteger) | tail |
Opens an archive at a path, skipping a fixed-size trailer.
The one reconstructed caller passes a tail of 16. Reads through a file-handle-backed I/O set.
- Parameters
-
| path | The archive's path. |
| tail | How many trailing bytes to skip; the archive occupies the file up to that point. |
- Returns
- The opened archive, or nil when the file is not larger than
tail or cannot be opened.
- Ghidra address:
- 0x76150
◆ uncompress:
| - (nullable NSMutableData *) uncompress: |
|
(nullable NSString *) | name |
|
Reads one entry out of the archive.
The bytes come back still enciphered — -[ArtworkLoader loadArtwork] runs them through BFCodec before they are an image.
- Parameters
-
| name | The entry's name; matched case-sensitively. |
- Returns
- The entry's uncompressed bytes, or nil when it is absent, empty, or cannot be read.
- Ghidra address:
- 0x76e34
◆ uncompressedSize:
| - (NSUInteger) uncompressedSize: |
|
(nullable NSString *) | name |
|
Returns the uncompressed size of a named entry.
- Parameters
-
| name | The entry's name; matched case-sensitively. |
- Returns
- The entry's uncompressed size in bytes, or 0 when it is absent or its info cannot be read.
- Ghidra address:
- 0x76bbc
The documentation for this class was generated from the following files: