159 #define LIB_MSPACK_H 1
165 #include <sys/types.h>
191 #define MSPACK_SYS_SELFTEST(result) do { \
192 (result) = mspack_sys_selftest_internal(sizeof(off_t)); \
232 #define MSPACK_VER_LIBRARY (0)
234 #define MSPACK_VER_SYSTEM (1)
236 #define MSPACK_VER_MSCABD (2)
238 #define MSPACK_VER_MSCABC (3)
240 #define MSPACK_VER_MSCHMD (4)
242 #define MSPACK_VER_MSCHMC (5)
244 #define MSPACK_VER_MSLITD (6)
246 #define MSPACK_VER_MSLITC (7)
248 #define MSPACK_VER_MSHLPD (8)
250 #define MSPACK_VER_MSHLPC (9)
252 #define MSPACK_VER_MSSZDDD (10)
254 #define MSPACK_VER_MSSZDDC (11)
256 #define MSPACK_VER_MSKWAJD (12)
258 #define MSPACK_VER_MSKWAJC (13)
260 #define MSPACK_VER_MSOABD (14)
262 #define MSPACK_VER_MSOABC (15)
458 #define MSPACK_SYS_OPEN_READ (0)
460 #define MSPACK_SYS_OPEN_WRITE (1)
462 #define MSPACK_SYS_OPEN_UPDATE (2)
464 #define MSPACK_SYS_OPEN_APPEND (3)
467 #define MSPACK_SYS_SEEK_START (0)
469 #define MSPACK_SYS_SEEK_CUR (1)
471 #define MSPACK_SYS_SEEK_END (2)
485 #define MSPACK_ERR_OK (0)
487 #define MSPACK_ERR_ARGS (1)
489 #define MSPACK_ERR_OPEN (2)
491 #define MSPACK_ERR_READ (3)
493 #define MSPACK_ERR_WRITE (4)
495 #define MSPACK_ERR_SEEK (5)
497 #define MSPACK_ERR_NOMEMORY (6)
499 #define MSPACK_ERR_SIGNATURE (7)
501 #define MSPACK_ERR_DATAFORMAT (8)
503 #define MSPACK_ERR_CHECKSUM (9)
505 #define MSPACK_ERR_CRUNCH (10)
507 #define MSPACK_ERR_DECRUNCH (11)
788 #define MSCAB_HDR_RESV_OFFSET (0x28)
791 #define MSCAB_HDR_PREVCAB (0x01)
793 #define MSCAB_HDR_NEXTCAB (0x02)
795 #define MSCAB_HDR_RESV (0x04)
839 #define MSCABD_COMP_METHOD(comp_type) ((comp_type) & 0x0F)
847 #define MSCABD_COMP_LEVEL(comp_type) (((comp_type) >> 8) & 0x1F)
850 #define MSCAB_COMP_NONE (0)
852 #define MSCAB_COMP_MSZIP (1)
854 #define MSCAB_COMP_QUANTUM (2)
856 #define MSCAB_COMP_LZX (3)
919 #define MSCAB_ATTRIB_RDONLY (0x01)
921 #define MSCAB_ATTRIB_HIDDEN (0x02)
923 #define MSCAB_ATTRIB_SYSTEM (0x04)
925 #define MSCAB_ATTRIB_ARCH (0x20)
927 #define MSCAB_ATTRIB_EXEC (0x40)
929 #define MSCAB_ATTRIB_UTF_NAME (0x80)
932 #define MSCABD_PARAM_SEARCHBUF (0)
934 #define MSCABD_PARAM_FIXMSZIP (1)
936 #define MSCABD_PARAM_DECOMPBUF (2)
943 #define MSCABD_PARAM_SALVAGE (3)
1394 #define MSCHMC_ENDLIST (0)
1396 #define MSCHMC_UNCOMP (1)
1398 #define MSCHMC_MSCOMP (2)
1401 #define MSCHMC_PARAM_TIMESTAMP (0)
1403 #define MSCHMC_PARAM_LANGUAGE (1)
1405 #define MSCHMC_PARAM_LZXWINDOW (2)
1407 #define MSCHMC_PARAM_DENSITY (3)
1409 #define MSCHMC_PARAM_INDEX (4)
1452 const char *output_file);
1509 const char *temp_file);
1755 #define MSSZDDC_PARAM_MISSINGCHAR (0)
1758 #define MSSZDD_FMT_NORMAL (0)
1761 #define MSSZDD_FMT_QBASIC (1)
1970 #define MSKWAJC_PARAM_COMP_TYPE (0)
1975 #define MSKWAJC_PARAM_INCLUDE_LENGTH (1)
1978 #define MSKWAJ_COMP_NONE (0)
1980 #define MSKWAJ_COMP_XOR (1)
1982 #define MSKWAJ_COMP_SZDD (2)
1984 #define MSKWAJ_COMP_LZH (3)
1986 #define MSKWAJ_COMP_MSZIP (4)
1989 #define MSKWAJ_HDR_HASLENGTH (0x01)
1992 #define MSKWAJ_HDR_HASUNKNOWN1 (0x02)
1995 #define MSKWAJ_HDR_HASUNKNOWN2 (0x04)
1998 #define MSKWAJ_HDR_HASFILENAME (0x08)
2001 #define MSKWAJ_HDR_HASFILEEXT (0x10)
2004 #define MSKWAJ_HDR_HASEXTRATEXT (0x20)
2379 #define MSOABD_PARAM_DECOMPBUF (0)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
int(* append)(struct mscab_decompressor *self, struct mscabd_cabinet *cab, struct mscabd_cabinet *nextcab)
int(* last_error)(struct mscab_decompressor *self)
int(* extract)(struct mscab_decompressor *self, struct mscabd_file *file, const char *filename)
int(* prepend)(struct mscab_decompressor *self, struct mscabd_cabinet *cab, struct mscabd_cabinet *prevcab)
void(* close)(struct mscab_decompressor *self, struct mscabd_cabinet *cab)
int(* set_param)(struct mscab_decompressor *self, int param, int value)
struct mscabd_cabinet * next
unsigned short header_resv
struct mscabd_cabinet * prevcab
struct mscabd_folder * folders
struct mscabd_file * files
struct mscabd_cabinet * nextcab
struct mscabd_file * next
struct mscabd_folder * folder
struct mscabd_folder * next
int(* generate)(struct mschm_compressor *self, struct mschmc_file file_list[], const char *output_file)
int(* last_error)(struct mschm_compressor *self)
int(* use_temporary_file)(struct mschm_compressor *self, int use_temp_file, const char *temp_file)
int(* set_param)(struct mschm_compressor *self, int param, int value)
void(* close)(struct mschm_decompressor *self, struct mschmd_header *chm)
int(* extract)(struct mschm_decompressor *self, struct mschmd_file *file, const char *filename)
int(* fast_find)(struct mschm_decompressor *self, struct mschmd_header *chm, const char *filename, struct mschmd_file *f_ptr, int f_size)
int(* last_error)(struct mschm_decompressor *self)
struct mschmd_file * next
struct mschmd_section * section
struct mschmd_file * content
struct mschmd_file * rtable
struct mschmd_file * spaninfo
struct mschmd_section base
struct mschmd_file * control
struct mschmd_section base
struct mschmd_header * chm
int(* set_filename)(struct mskwaj_compressor *self, const char *filename)
int(* compress)(struct mskwaj_compressor *self, const char *input, const char *output, off_t length)
int(* set_extra_data)(struct mskwaj_compressor *self, void *data, size_t bytes)
int(* last_error)(struct mschm_decompressor *self)
int(* set_param)(struct mskwaj_compressor *self, int param, int value)
int(* extract)(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj, const char *filename)
int(* last_error)(struct mskwaj_decompressor *self)
int(* decompress)(struct mskwaj_decompressor *self, const char *input, const char *output)
void(* close)(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj)
int(* compress)(struct msoab_compressor *self, const char *input, const char *output)
int(* compress_incremental)(struct msoab_compressor *self, const char *input, const char *base, const char *output)
int(* decompress_incremental)(struct msoab_decompressor *self, const char *input, const char *base, const char *output)
int(* decompress)(struct msoab_decompressor *self, const char *input, const char *output)
int(* set_param)(struct msoab_decompressor *self, int param, int value)
void(* copy)(void *src, void *dest, size_t bytes)
void(* close)(struct mspack_file *file)
void(* message)(struct mspack_file *file, const char *format,...)
int(* seek)(struct mspack_file *file, off_t offset, int mode)
int(* read)(struct mspack_file *file, void *buffer, int bytes)
int(* write)(struct mspack_file *file, void *buffer, int bytes)
off_t(* tell)(struct mspack_file *file)
int(* last_error)(struct mschm_decompressor *self)
int(* set_param)(struct msszdd_compressor *self, int param, int value)
int(* compress)(struct msszdd_compressor *self, const char *input, const char *output, off_t length)
int(* extract)(struct msszdd_decompressor *self, struct msszddd_header *szdd, const char *filename)
int(* decompress)(struct msszdd_decompressor *self, const char *input, const char *output)
int(* last_error)(struct msszdd_decompressor *self)
void(* close)(struct msszdd_decompressor *self, struct msszddd_header *szdd)
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)