8 #include <pulsar/archive/archive_internal.h> PLSR_RC plsrArchiveOpenEx(const char *path, PLSR_Archive *out, bool storePath)
Open from a file at specified path (advanced)
u32 offset
Entry start offset in archive.
Definition: archive.h:57
PLSR_RC plsrArchiveReadString(const PLSR_Archive *ar, u32 offset, char *out, size_t size)
Read a null-terminated string at the specified offset.
NX_INLINE PLSR_RC plsrArchiveOpen(const char *path, PLSR_Archive *out)
Open from a file at specified path.
Definition: archive.h:85
Archive section.
Definition: archive.h:34
Archive section header information.
Definition: archive.h:29
NX_INLINE PLSR_RC plsrArchiveRelativePath(const PLSR_Archive *ar, const char *path, char *out, size_t size)
Construct path relative to the physical archive file.
Definition: archive.h:100
NX_INLINE PLSR_RC plsrArchiveReadAt(const PLSR_Archive *ar, u32 offset, void *out, size_t size)
Read archive contents at the specified offset.
Definition: archive.h:114
u32 offset
Section start offset in archive.
Definition: archive.h:35
u32 offset
List start offset in archive.
Definition: archive.h:69
Archive list information.
Definition: archive.h:62
PLSR_RC plsrArchiveReadTableEntry(const PLSR_Archive *ar, const PLSR_ArchiveTable *table, u16 id, u32 index, PLSR_ArchiveTableEntry *out)
Read one archive table entry at specified index.
PLSR_RC plsrArchiveOpenInside(const PLSR_Archive *ar, u32 offset, PLSR_Archive *out)
Open from inside another archive at specified offset.
Archive version found in header.
Definition: archive.h:12
u32 count
Table entry/block count.
Definition: archive.h:41
void plsrArchiveClose(PLSR_Archive *ar)
Close archive, releasing resources if applicable.
PLSR_ArchiveSectionInfo info
Cached section information.
Definition: archive.h:36
Archive section header information.
Definition: archive.h:40
File could not be opened or read.
Definition: types.h:79
Shared archive file management.
PLSR_ArchiveFileHandle handle
File handle, closed when all archives with the same handle are closed.
Definition: archive.h:76
Archive table block (sized entry)
Definition: archive.h:56
Definition: archive_file.h:12
Archive file.
Definition: archive.h:75
PLSR_ArchiveTableInfo info
Cached table information.
Definition: archive.h:47
Requested data could not be retrieved.
Definition: types.h:83
Archive list (fixed size data array)
Definition: archive.h:68
u32 offset
Start offset of the archive in the file.
Definition: archive.h:77
u32 offset
Entry start offset in archive.
Definition: archive.h:52
PLSR_RC plsrArchiveReadTableHeaderInfo(const PLSR_Archive *ar, u32 offset, PLSR_ArchiveTableInfo *out)
Read archive table header information.
PLSR_RC plsrArchiveReadAtEx(const PLSR_Archive *ar, u32 offset, void *out, size_t size, bool acceptZero)
Read archive contents at the specified offset (advanced)
PLSR_ArchiveListInfo info
Cached list information.
Definition: archive.h:70
NX_INLINE PLSR_RC plsrArchiveRead(const PLSR_Archive *ar, void *out, size_t size)
Read archive contents at the current position.
Definition: archive.h:105
u32 PLSR_RC
Result code returned by Pulsar functions.
Definition: types.h:73
#define PLSR_RC_OK
Result code returned on success.
Definition: types.h:32
PLSR_RC plsrArchiveListGetEntry(const PLSR_Archive *ar, const PLSR_ArchiveList *list, u32 index, void *out)
Read one list entry.
PLSR_RC plsrArchiveReadHeaderInfo(const PLSR_Archive *ar, const char *magic, PLSR_ArchiveHeaderInfo *out)
Read archive header.
PLSR_RC plsrArchiveReadSectionHeaderInfo(const PLSR_Archive *ar, u32 offset, const char *magic, PLSR_ArchiveSectionInfo *out)
Read archive section header.
u32 offset
Table start offset in archive.
Definition: archive.h:46
Archive table entry (fixed size entry)
Definition: archive.h:51
PLSR_RC plsrArchiveReadTableBlock(const PLSR_Archive *ar, const PLSR_ArchiveTable *table, u16 id, u32 index, PLSR_ArchiveTableBlock *out)
Read one table block at specified index.
u32 blockSize
Section size.
Definition: archive.h:30
PLSR_RC plsrArchiveListReadEntries(const PLSR_Archive *ar, const PLSR_ArchiveList *list, u32 startIndex, u32 count, void *outEntries, u32 *outReadCount)
Read a number of list entries starting from the specified index.
Archive table (entry list)
Definition: archive.h:45