Rizin
unix-like reverse engineering framework and cli tools
mspack.h
Go to the documentation of this file.
1 /* libmspack -- a library for working with Microsoft compression formats.
2  * (C) 2003-2019 Stuart Caie <kyzer@cabextract.org.uk>
3  *
4  * libmspack is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License (LGPL) version 2.1
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15  */
16 
158 #ifndef LIB_MSPACK_H
159 #define LIB_MSPACK_H 1
160 
161 #ifdef __cplusplus
162 extern "C" {
163 #endif
164 
165 #include <sys/types.h>
166 #include <stdlib.h>
167 
191 #define MSPACK_SYS_SELFTEST(result) do { \
192  (result) = mspack_sys_selftest_internal(sizeof(off_t)); \
193 } while (0)
194 
196 extern int mspack_sys_selftest_internal(int);
197 
229 extern int mspack_version(int entity);
230 
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)
263 
264 /* --- file I/O abstraction ------------------------------------------------ */
265 
310  struct mspack_file * (*open)(struct mspack_system *self,
311  const char *filename,
312  int mode);
313 
321  void (*close)(struct mspack_file *file);
322 
336  int (*read)(struct mspack_file *file,
337  void *buffer,
338  int bytes);
339 
353  int (*write)(struct mspack_file *file,
354  void *buffer,
355  int bytes);
356 
380  int (*seek)(struct mspack_file *file,
381  off_t offset,
382  int mode);
383 
391  off_t (*tell)(struct mspack_file *file);
392 
407  void (*message)(struct mspack_file *file,
408  const char *format,
409  ...);
410 
421  void * (*alloc)(struct mspack_system *self,
422  size_t bytes);
423 
430  void (*free)(void *ptr);
431 
444  void (*copy)(void *src,
445  void *dest,
446  size_t bytes);
447 
454  void *null_ptr;
455 };
456 
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)
465 
467 #define MSPACK_SYS_SEEK_START (0)
469 #define MSPACK_SYS_SEEK_CUR (1)
471 #define MSPACK_SYS_SEEK_END (2)
472 
478 struct mspack_file {
479  int dummy;
480 };
481 
482 /* --- error codes --------------------------------------------------------- */
483 
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)
508 
509 /* --- functions available in library -------------------------------------- */
510 
515 extern struct mscab_compressor *
517 
522 extern struct mscab_decompressor *
524 
528 extern void mspack_destroy_cab_compressor(struct mscab_compressor *self);
529 
533 extern void mspack_destroy_cab_decompressor(struct mscab_decompressor *self);
534 
535 
540 extern struct mschm_compressor *
542 
547 extern struct mschm_decompressor *
549 
553 extern void mspack_destroy_chm_compressor(struct mschm_compressor *self);
554 
558 extern void mspack_destroy_chm_decompressor(struct mschm_decompressor *self);
559 
560 
565 extern struct mslit_compressor *
567 
572 extern struct mslit_decompressor *
574 
578 extern void mspack_destroy_lit_compressor(struct mslit_compressor *self);
579 
583 extern void mspack_destroy_lit_decompressor(struct mslit_decompressor *self);
584 
585 
590 extern struct mshlp_compressor *
592 
597 extern struct mshlp_decompressor *
599 
603 extern void mspack_destroy_hlp_compressor(struct mshlp_compressor *self);
604 
608 extern void mspack_destroy_hlp_decompressor(struct mshlp_decompressor *self);
609 
610 
615 extern struct msszdd_compressor *
617 
622 extern struct msszdd_decompressor *
624 
628 extern void mspack_destroy_szdd_compressor(struct msszdd_compressor *self);
629 
633 extern void mspack_destroy_szdd_decompressor(struct msszdd_decompressor *self);
634 
635 
640 extern struct mskwaj_compressor *
642 
647 extern struct mskwaj_decompressor *
649 
653 extern void mspack_destroy_kwaj_compressor(struct mskwaj_compressor *self);
654 
658 extern void mspack_destroy_kwaj_decompressor(struct mskwaj_decompressor *self);
659 
660 
665 extern struct msoab_compressor *
667 
672 extern struct msoab_decompressor *
674 
678 extern void mspack_destroy_oab_compressor(struct msoab_compressor *self);
679 
684 
685 
686 /* --- support for .CAB (MS Cabinet) file format --------------------------- */
687 
706 
712  const char *filename;
713 
716 
718  unsigned int length;
719 
722 
725 
727  char *prevname;
728 
730  char *nextname;
731 
735  char *previnfo;
736 
740  char *nextinfo;
741 
744 
747 
752  unsigned short set_id;
753 
759  unsigned short set_index;
760 
771  unsigned short header_resv;
772 
784  int flags;
785 };
786 
788 #define MSCAB_HDR_RESV_OFFSET (0x28)
789 
791 #define MSCAB_HDR_PREVCAB (0x01)
793 #define MSCAB_HDR_NEXTCAB (0x02)
795 #define MSCAB_HDR_RESV (0x04)
796 
812 
823 
829  unsigned int num_blocks;
830 };
831 
839 #define MSCABD_COMP_METHOD(comp_type) ((comp_type) & 0x0F)
847 #define MSCABD_COMP_LEVEL(comp_type) (((comp_type) >> 8) & 0x1F)
848 
850 #define MSCAB_COMP_NONE (0)
852 #define MSCAB_COMP_MSZIP (1)
854 #define MSCAB_COMP_QUANTUM (2)
856 #define MSCAB_COMP_LZX (3)
857 
863 struct mscabd_file {
868  struct mscabd_file *next;
869 
878  char *filename;
879 
881  unsigned int length;
882 
895  int attribs;
896 
898  char time_h;
900  char time_m;
902  char time_s;
903 
905  char date_d;
907  char date_m;
909  int date_y;
910 
913 
915  unsigned int offset;
916 };
917 
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)
930 
932 #define MSCABD_PARAM_SEARCHBUF (0)
934 #define MSCABD_PARAM_FIXMSZIP (1)
936 #define MSCABD_PARAM_DECOMPBUF (2)
943 #define MSCABD_PARAM_SALVAGE (3)
944 
947  int dummy;
948 };
949 
978  struct mscabd_cabinet * (*open) (struct mscab_decompressor *self,
979  const char *filename);
980 
1010  void (*close)(struct mscab_decompressor *self,
1011  struct mscabd_cabinet *cab);
1012 
1047  struct mscabd_cabinet * (*search) (struct mscab_decompressor *self,
1048  const char *filename);
1049 
1090  int (*append) (struct mscab_decompressor *self,
1091  struct mscabd_cabinet *cab,
1092  struct mscabd_cabinet *nextcab);
1093 
1112  int (*prepend) (struct mscab_decompressor *self,
1113  struct mscabd_cabinet *cab,
1114  struct mscabd_cabinet *prevcab);
1115 
1138  int (*extract)(struct mscab_decompressor *self,
1139  struct mscabd_file *file,
1140  const char *filename);
1141 
1165  int param,
1166  int value);
1167 
1180 };
1181 
1182 /* --- support for .CHM (HTMLHelp) file format ----------------------------- */
1183 
1192 struct mschmc_file {
1194  int section;
1195 
1198  const char *filename;
1199 
1203 
1208 };
1209 
1221 
1227  unsigned int id;
1228 };
1229 
1237  struct mschmd_section base;
1238 
1241 };
1242 
1250  struct mschmd_section base;
1251 
1254 
1257 
1260 
1265 };
1266 
1274  unsigned int version;
1275 
1283  unsigned int timestamp;
1284 
1289  unsigned int language;
1290 
1295  const char *filename;
1296 
1299 
1302 
1310 
1313 
1316 
1319 
1321  unsigned int num_chunks;
1322 
1324  unsigned int chunk_size;
1325 
1327  unsigned int density;
1328 
1337  unsigned int depth;
1338 
1344  unsigned int index_root;
1345 
1350  unsigned int first_pmgl;
1351 
1356  unsigned int last_pmgl;
1357 
1362  unsigned char **chunk_cache;
1363 };
1364 
1370 struct mschmd_file {
1376 
1382 
1385 
1388 
1390  char *filename;
1391 };
1392 
1394 #define MSCHMC_ENDLIST (0)
1396 #define MSCHMC_UNCOMP (1)
1398 #define MSCHMC_MSCOMP (2)
1399 
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)
1410 
1450  int (*generate)(struct mschm_compressor *self,
1451  struct mschmc_file file_list[],
1452  const char *output_file);
1453 
1508  int use_temp_file,
1509  const char *temp_file);
1555  int (*set_param)(struct mschm_compressor *self,
1556  int param,
1557  int value);
1558 
1567  int (*last_error)(struct mschm_compressor *self);
1568 };
1569 
1598  struct mschmd_header *(*open)(struct mschm_decompressor *self,
1599  const char *filename);
1600 
1618  void (*close)(struct mschm_decompressor *self,
1619  struct mschmd_header *chm);
1620 
1639  int (*extract)(struct mschm_decompressor *self,
1640  struct mschmd_file *file,
1641  const char *filename);
1642 
1655 
1678  struct mschmd_header *(*fast_open)(struct mschm_decompressor *self,
1679  const char *filename);
1680 
1720  struct mschmd_header *chm,
1721  const char *filename,
1722  struct mschmd_file *f_ptr,
1723  int f_size);
1724 };
1725 
1726 /* --- support for .LIT (EBook) file format -------------------------------- */
1727 
1730  int dummy;
1731 };
1732 
1735  int dummy;
1736 };
1737 
1738 
1739 /* --- support for .HLP (MS Help) file format ------------------------------ */
1740 
1743  int dummy;
1744 };
1745 
1748  int dummy;
1749 };
1750 
1751 
1752 /* --- support for SZDD file format ---------------------------------------- */
1753 
1755 #define MSSZDDC_PARAM_MISSINGCHAR (0)
1756 
1758 #define MSSZDD_FMT_NORMAL (0)
1759 
1761 #define MSSZDD_FMT_QBASIC (1)
1762 
1770  int format;
1771 
1774 
1783 };
1784 
1828  int (*compress)(struct msszdd_compressor *self,
1829  const char *input,
1830  const char *output,
1831  off_t length);
1832 
1855  int param,
1856  int value);
1857 
1867 };
1868 
1896  struct msszddd_header *(*open)(struct msszdd_decompressor *self,
1897  const char *filename);
1898 
1912  void (*close)(struct msszdd_decompressor *self,
1913  struct msszddd_header *szdd);
1914 
1929  struct msszddd_header *szdd,
1930  const char *filename);
1931 
1950  const char *input,
1951  const char *output);
1952 
1965 };
1966 
1967 /* --- support for KWAJ file format ---------------------------------------- */
1968 
1970 #define MSKWAJC_PARAM_COMP_TYPE (0)
1971 
1975 #define MSKWAJC_PARAM_INCLUDE_LENGTH (1)
1976 
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)
1987 
1989 #define MSKWAJ_HDR_HASLENGTH (0x01)
1990 
1992 #define MSKWAJ_HDR_HASUNKNOWN1 (0x02)
1993 
1995 #define MSKWAJ_HDR_HASUNKNOWN2 (0x04)
1996 
1998 #define MSKWAJ_HDR_HASFILENAME (0x08)
1999 
2001 #define MSKWAJ_HDR_HASFILEEXT (0x10)
2002 
2004 #define MSKWAJ_HDR_HASEXTRATEXT (0x20)
2005 
2015  unsigned short comp_type;
2016 
2019 
2021  int headers;
2022 
2025 
2027  char *filename;
2028 
2032  char *extra;
2033 
2035  unsigned short extra_length;
2036 };
2037 
2064  int (*compress)(struct mskwaj_compressor *self,
2065  const char *input,
2066  const char *output,
2067  off_t length);
2068 
2093  int param,
2094  int value);
2095 
2096 
2115  const char *filename);
2116 
2135  void *data,
2136  size_t bytes);
2137 
2147 };
2148 
2176  struct mskwajd_header *(*open)(struct mskwaj_decompressor *self,
2177  const char *filename);
2178 
2191  void (*close)(struct mskwaj_decompressor *self,
2192  struct mskwajd_header *kwaj);
2193 
2208  struct mskwajd_header *kwaj,
2209  const char *filename);
2210 
2229  const char *input,
2230  const char *output);
2231 
2244 };
2245 
2246 /* --- support for .LZX (Offline Address Book) file format ----------------- */
2247 
2270  int (*compress) (struct msoab_compressor *self,
2271  const char *input,
2272  const char *output);
2273 
2295  const char *input,
2296  const char *base,
2297  const char *output);
2298 };
2299 
2324  const char *input,
2325  const char *output);
2326 
2353  const char *input,
2354  const char *base,
2355  const char *output);
2356 
2373  int param,
2374  int value);
2375 
2376 };
2377 
2379 #define MSOABD_PARAM_DECOMPBUF (0)
2380 
2381 #ifdef __cplusplus
2382 }
2383 #endif
2384 
2385 #endif
lzma_index * src
Definition: index.h:567
static ut8 bytes[32]
Definition: asm_arc.c:23
struct buffer buffer
struct msszdd_compressor * mspack_create_szdd_compressor(struct mspack_system *sys)
Definition: szddc.c:16
struct mslit_decompressor * mspack_create_lit_decompressor(struct mspack_system *sys)
Definition: litd.c:16
void mspack_destroy_chm_compressor(struct mschm_compressor *self)
Definition: chmc.c:22
struct mshlp_decompressor * mspack_create_hlp_decompressor(struct mspack_system *sys)
Definition: hlpd.c:16
void mspack_destroy_cab_decompressor(struct mscab_decompressor *self)
Definition: cabd.c:173
void mspack_destroy_hlp_decompressor(struct mshlp_decompressor *self)
Definition: hlpd.c:22
struct msoab_decompressor * mspack_create_oab_decompressor(struct mspack_system *sys)
Definition: oabd.c:43
int mspack_version(int entity)
Definition: system.c:16
void mspack_destroy_cab_compressor(struct mscab_compressor *self)
Definition: cabc.c:22
void mspack_destroy_szdd_compressor(struct msszdd_compressor *self)
Definition: szddc.c:22
void mspack_destroy_chm_decompressor(struct mschm_decompressor *self)
Definition: chmd.c:104
void mspack_destroy_lit_decompressor(struct mslit_decompressor *self)
Definition: litd.c:22
struct mschm_decompressor * mspack_create_chm_decompressor(struct mspack_system *sys)
Definition: chmd.c:78
void mspack_destroy_hlp_compressor(struct mshlp_compressor *self)
Definition: hlpc.c:22
struct mschm_compressor * mspack_create_chm_compressor(struct mspack_system *sys)
Definition: chmc.c:16
int mspack_sys_selftest_internal(int)
Definition: system.c:53
struct msszdd_decompressor * mspack_create_szdd_decompressor(struct mspack_system *sys)
Definition: szddd.c:41
struct mslit_compressor * mspack_create_lit_compressor(struct mspack_system *sys)
Definition: litc.c:16
struct mshlp_compressor * mspack_create_hlp_compressor(struct mspack_system *sys)
Definition: hlpc.c:16
struct mscab_decompressor * mspack_create_cab_decompressor(struct mspack_system *sys)
Definition: cabd.c:140
void mspack_destroy_oab_decompressor(struct msoab_decompressor *self)
Definition: oabd.c:60
struct msoab_compressor * mspack_create_oab_compressor(struct mspack_system *sys)
Definition: oabc.c:16
struct mscab_compressor * mspack_create_cab_compressor(struct mspack_system *sys)
Definition: cabc.c:16
struct mskwaj_compressor * mspack_create_kwaj_compressor(struct mspack_system *sys)
Definition: kwajc.c:16
void mspack_destroy_szdd_decompressor(struct msszdd_decompressor *self)
Definition: szddd.c:65
void mspack_destroy_lit_compressor(struct mslit_compressor *self)
Definition: litc.c:22
struct mskwaj_decompressor * mspack_create_kwaj_decompressor(struct mspack_system *sys)
Definition: kwajd.c:55
void mspack_destroy_kwaj_compressor(struct mskwaj_compressor *self)
Definition: kwajc.c:22
void mspack_destroy_kwaj_decompressor(struct mskwaj_decompressor *self)
Definition: kwajd.c:79
void mspack_destroy_oab_compressor(struct msoab_compressor *self)
Definition: oabc.c:22
static int value
Definition: cmd_api.c:93
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
Definition: sflib.h:133
const char * filename
Definition: ioapi.h:137
voidpf uLong offset
Definition: ioapi.h:144
const char int mode
Definition: ioapi.h:137
#define const
Definition: ansidecl.h:240
char * dest
Definition: lz4.h:697
static int
Definition: sfsocketcall.h:114
int off_t
Definition: sftypes.h:41
int(* append)(struct mscab_decompressor *self, struct mscabd_cabinet *cab, struct mscabd_cabinet *nextcab)
Definition: mspack.h:1090
int(* last_error)(struct mscab_decompressor *self)
Definition: mspack.h:1179
int(* extract)(struct mscab_decompressor *self, struct mscabd_file *file, const char *filename)
Definition: mspack.h:1138
int(* prepend)(struct mscab_decompressor *self, struct mscabd_cabinet *cab, struct mscabd_cabinet *prevcab)
Definition: mspack.h:1112
void(* close)(struct mscab_decompressor *self, struct mscabd_cabinet *cab)
Definition: mspack.h:1010
int(* set_param)(struct mscab_decompressor *self, int param, int value)
Definition: mspack.h:1164
const char * filename
Definition: mspack.h:712
char * prevname
Definition: mspack.h:727
unsigned short set_id
Definition: mspack.h:752
unsigned short set_index
Definition: mspack.h:759
struct mscabd_cabinet * next
Definition: mspack.h:705
unsigned short header_resv
Definition: mspack.h:771
struct mscabd_cabinet * prevcab
Definition: mspack.h:721
unsigned int length
Definition: mspack.h:718
char * previnfo
Definition: mspack.h:735
off_t base_offset
Definition: mspack.h:715
struct mscabd_folder * folders
Definition: mspack.h:746
char * nextinfo
Definition: mspack.h:740
char * nextname
Definition: mspack.h:730
struct mscabd_file * files
Definition: mspack.h:743
struct mscabd_cabinet * nextcab
Definition: mspack.h:724
unsigned int length
Definition: mspack.h:881
char time_m
Definition: mspack.h:900
int attribs
Definition: mspack.h:895
char date_d
Definition: mspack.h:905
unsigned int offset
Definition: mspack.h:915
char time_h
Definition: mspack.h:898
int date_y
Definition: mspack.h:909
struct mscabd_file * next
Definition: mspack.h:868
char time_s
Definition: mspack.h:902
char * filename
Definition: mspack.h:878
struct mscabd_folder * folder
Definition: mspack.h:912
char date_m
Definition: mspack.h:907
unsigned int num_blocks
Definition: mspack.h:829
struct mscabd_folder * next
Definition: mspack.h:811
int comp_type
Definition: mspack.h:822
int(* generate)(struct mschm_compressor *self, struct mschmc_file file_list[], const char *output_file)
Definition: mspack.h:1450
int(* last_error)(struct mschm_compressor *self)
Definition: mspack.h:1567
int(* use_temporary_file)(struct mschm_compressor *self, int use_temp_file, const char *temp_file)
Definition: mspack.h:1507
int(* set_param)(struct mschm_compressor *self, int param, int value)
Definition: mspack.h:1555
void(* close)(struct mschm_decompressor *self, struct mschmd_header *chm)
Definition: mspack.h:1618
int(* extract)(struct mschm_decompressor *self, struct mschmd_file *file, const char *filename)
Definition: mspack.h:1639
int(* fast_find)(struct mschm_decompressor *self, struct mschmd_header *chm, const char *filename, struct mschmd_file *f_ptr, int f_size)
Definition: mspack.h:1719
int(* last_error)(struct mschm_decompressor *self)
Definition: mspack.h:1654
int section
Definition: mspack.h:1194
char * chm_filename
Definition: mspack.h:1202
off_t length
Definition: mspack.h:1207
const char * filename
Definition: mspack.h:1198
char * filename
Definition: mspack.h:1390
struct mschmd_file * next
Definition: mspack.h:1375
struct mschmd_section * section
Definition: mspack.h:1381
off_t length
Definition: mspack.h:1387
off_t offset
Definition: mspack.h:1384
off_t dir_offset
Definition: mspack.h:1318
unsigned char ** chunk_cache
Definition: mspack.h:1362
unsigned int version
Definition: mspack.h:1274
struct mschmd_file * sysfiles
Definition: mspack.h:1309
off_t length
Definition: mspack.h:1298
unsigned int depth
Definition: mspack.h:1337
unsigned int last_pmgl
Definition: mspack.h:1356
struct mschmd_file * files
Definition: mspack.h:1301
unsigned int first_pmgl
Definition: mspack.h:1350
unsigned int index_root
Definition: mspack.h:1344
unsigned int timestamp
Definition: mspack.h:1283
unsigned int language
Definition: mspack.h:1289
struct mschmd_sec_mscompressed sec1
Definition: mspack.h:1315
unsigned int chunk_size
Definition: mspack.h:1324
const char * filename
Definition: mspack.h:1295
unsigned int num_chunks
Definition: mspack.h:1321
struct mschmd_sec_uncompressed sec0
Definition: mspack.h:1312
unsigned int density
Definition: mspack.h:1327
struct mschmd_file * content
Definition: mspack.h:1253
struct mschmd_file * rtable
Definition: mspack.h:1259
struct mschmd_file * spaninfo
Definition: mspack.h:1264
struct mschmd_section base
Definition: mspack.h:1250
struct mschmd_file * control
Definition: mspack.h:1256
struct mschmd_section base
Definition: mspack.h:1237
unsigned int id
Definition: mspack.h:1227
struct mschmd_header * chm
Definition: mspack.h:1220
int(* set_filename)(struct mskwaj_compressor *self, const char *filename)
Definition: mspack.h:2114
int(* compress)(struct mskwaj_compressor *self, const char *input, const char *output, off_t length)
Definition: mspack.h:2064
int(* set_extra_data)(struct mskwaj_compressor *self, void *data, size_t bytes)
Definition: mspack.h:2134
int(* last_error)(struct mschm_decompressor *self)
Definition: mspack.h:2146
int(* set_param)(struct mskwaj_compressor *self, int param, int value)
Definition: mspack.h:2092
int(* extract)(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj, const char *filename)
Definition: mspack.h:2207
int(* last_error)(struct mskwaj_decompressor *self)
Definition: mspack.h:2243
int(* decompress)(struct mskwaj_decompressor *self, const char *input, const char *output)
Definition: mspack.h:2228
void(* close)(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj)
Definition: mspack.h:2191
unsigned short extra_length
Definition: mspack.h:2035
char * filename
Definition: mspack.h:2027
unsigned short comp_type
Definition: mspack.h:2015
char * extra
Definition: mspack.h:2032
off_t data_offset
Definition: mspack.h:2018
off_t length
Definition: mspack.h:2024
int(* compress)(struct msoab_compressor *self, const char *input, const char *output)
Definition: mspack.h:2270
int(* compress_incremental)(struct msoab_compressor *self, const char *input, const char *base, const char *output)
Definition: mspack.h:2294
int(* decompress_incremental)(struct msoab_decompressor *self, const char *input, const char *base, const char *output)
Definition: mspack.h:2352
int(* decompress)(struct msoab_decompressor *self, const char *input, const char *output)
Definition: mspack.h:2323
int(* set_param)(struct msoab_decompressor *self, int param, int value)
Definition: mspack.h:2372
int dummy
Definition: mspack.h:479
void(* copy)(void *src, void *dest, size_t bytes)
Definition: mspack.h:444
void(* close)(struct mspack_file *file)
Definition: mspack.h:321
void(* message)(struct mspack_file *file, const char *format,...)
Definition: mspack.h:407
int(* seek)(struct mspack_file *file, off_t offset, int mode)
Definition: mspack.h:380
void(* free)(void *ptr)
Definition: mspack.h:430
int(* read)(struct mspack_file *file, void *buffer, int bytes)
Definition: mspack.h:336
int(* write)(struct mspack_file *file, void *buffer, int bytes)
Definition: mspack.h:353
void * null_ptr
Definition: mspack.h:454
off_t(* tell)(struct mspack_file *file)
Definition: mspack.h:391
int(* last_error)(struct mschm_decompressor *self)
Definition: mspack.h:1866
int(* set_param)(struct msszdd_compressor *self, int param, int value)
Definition: mspack.h:1854
int(* compress)(struct msszdd_compressor *self, const char *input, const char *output, off_t length)
Definition: mspack.h:1828
int(* extract)(struct msszdd_decompressor *self, struct msszddd_header *szdd, const char *filename)
Definition: mspack.h:1928
int(* decompress)(struct msszdd_decompressor *self, const char *input, const char *output)
Definition: mspack.h:1949
int(* last_error)(struct msszdd_decompressor *self)
Definition: mspack.h:1964
void(* close)(struct msszdd_decompressor *self, struct msszddd_header *szdd)
Definition: mspack.h:1912
off_t length
Definition: mspack.h:1773
char missing_char
Definition: mspack.h:1782
static int file
Definition: z80asm.c:58
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)
diff_output_t output
Definition: zipcmp.c:237