#pragma once #include #include typedef struct { int fd; // File descriptor. uint32_t pos; // position. uint32_t start, end; // file limits. } Packfile; // Packfile manipulation. Automatically allocated and freed (with open and close). int pack_check(char* filename); int pack_files(char* outfile, char** infiles, uint32_t nfiles); int pack_open(Packfile* file, char* packfile, char* filename); ssize_t pack_read(Packfile* file, void* buf, size_t count); int pack_close(Packfile* file);