#ifndef volez_ZIP_h
#define volez_ZIP_h 1

/* Local file header */
#define LFH_MAGIC	0x04034b50
#define LFH_MAGIC_OFS     0
#define LFH_VERREQ_OFS    4
#define LFH_FLAGS_OFS     6
#define LFH_METHOD_OFS    8
#define LFH_MODTIME_OFS   10
#define LFH_MODDATE_OFS   12
#define LFH_CRC32_OFS     14
#define LFH_CSIZE_OFS     18
#define LFH_UNCSIZE_OFS   22
#define LFH_FNLEN_OFS     26
#define LFH_EXLEN_OFS     28
#define LFH_FILENAME_OFS  30
/* extended and data follow filename */

/* Extended File Header */
#define EXH_MAGIC	0x08074b50
#define EXH_MAGIC_OFS     0
#define EXH_CRC32_OFS     4
#define EXH_CSIZE_OFS     8
#define EXH_UNCSIZE_OFS   12
#define EXH_DATA_OFS      16

/* Central Directory Header */
#define CDH_MAGIC	0x02014b50
#define CDH_MAGIC_OFS      0
#define CDH_VERSION_OFS    4
#define CDH_VERREQ_OFS     6
#define CDH_FLAGS_OFS      8
#define CDH_METHOD_OFS     10
#define CDH_MODTIME_OFS    12
#define CDH_MODDATE_OFS    14
#define CDH_CRC32_OFS      16
#define CDH_CSIZE_OFS      20
#define CDH_UNCSIZE_OFS    24
#define CDH_FNLEN_OFS      28
#define CDH_EXLEN_OFS      30
#define CDH_COMLEN_OFS     32
#define CDH_DISKNUM_OFS    34
#define CDH_IATTR_OFS      36
#define CDH_EATTR_OFS      38
#define CDH_LFH_OFS        42
#define CDH_FILENAME_OFS   46
/* extended and comment follow filename */

/* End of Central Directory */
#define EOCD_MAGIC	0x06054b50
#define EOCD_MAGIC_OFS      0
#define EOCD_DISKNUM_OFS    4
#define EOCD_CDDISKNUM_OFS  6
#define EOCD_FILES_OFS      8
#define EOCD_CDFILES_OFS    10
#define EOCD_SIZE_OFS       12
#define EOCD_CD_OFS         16
#define EOCD_COMLEN_OFS     20
#define EOCD_COMMENT_OFS    22

#endif
