36#ifndef __NILOREA_ZIP__
37#define __NILOREA_ZIP__
78int n_zip_extract(
const char* path,
const char* name,
const char* out);
87int n_zip_find_ending(
const char* path,
const char* ending,
char* name,
size_t name_len);
99int n_zip_read(
const char* path,
const char* name,
size_t max_size,
unsigned char** data,
size_t* len);
uint64_t size
its size once out
uint64_t compressed
its size in the archive
uint64_t offset
where its local header is
unsigned method
0 stored, 8 deflated
int n_zip_extract(const char *path, const char *name, const char *out)
write a member out to a file, checking its CRC-32
int n_zip_find(const char *path, const char *name, N_ZIP_MEMBER *member)
find a member by its full name in an archive's central directory
int n_zip_find_ending(const char *path, const char *ending, char *name, size_t name_len)
find the first member whose name ends with a given text, as a PyTorch checkpoint's "archive/data....
int n_zip_read(const char *path, const char *name, size_t max_size, unsigned char **data, size_t *len)
read a member into memory, checking its CRC-32
What n_zip_find() says about a member.