michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * JARFILE.H michael@0: * michael@0: * Certain constants and structures for the archive format. michael@0: * michael@0: */ michael@0: michael@0: /* ZIP */ michael@0: struct ZipLocal { /* 30 bytes */ michael@0: char signature [4]; michael@0: char word [2]; michael@0: char bitflag [2]; michael@0: char method [2]; michael@0: char time [2]; michael@0: char date [2]; michael@0: char crc32 [4]; michael@0: char size [4]; michael@0: char orglen [4]; michael@0: char filename_len [2]; michael@0: char extrafield_len [2]; michael@0: }; michael@0: michael@0: struct ZipCentral { /* 46 bytes */ michael@0: char signature [4]; michael@0: char version_made_by [2]; michael@0: char version [2]; michael@0: char bitflag [2]; michael@0: char method [2]; michael@0: char time [2]; michael@0: char date [2]; michael@0: char crc32 [4]; michael@0: char size [4]; michael@0: char orglen [4]; michael@0: char filename_len [2]; michael@0: char extrafield_len [2]; michael@0: char commentfield_len [2]; michael@0: char diskstart_number [2]; michael@0: char internal_attributes [2]; michael@0: char external_attributes [4]; michael@0: char localhdr_offset [4]; michael@0: }; michael@0: michael@0: struct ZipEnd { /* 22 bytes */ michael@0: char signature [4]; michael@0: char disk_nr [2]; michael@0: char start_central_dir [2]; michael@0: char total_entries_disk [2]; michael@0: char total_entries_archive [2]; michael@0: char central_dir_size [4]; michael@0: char offset_central_dir [4]; michael@0: char commentfield_len [2]; michael@0: }; michael@0: michael@0: #define LSIG 0x04034B50l michael@0: #define CSIG 0x02014B50l michael@0: #define ESIG 0x06054B50l michael@0: michael@0: /* TAR */ michael@0: union TarEntry { /* 512 bytes */ michael@0: struct header { /* 257 bytes */ michael@0: char filename [100]; michael@0: char mode [8]; michael@0: char uid [8]; michael@0: char gid [8]; michael@0: char size [12]; michael@0: char time [12]; michael@0: char checksum [8]; michael@0: char linkflag; michael@0: char linkname [100]; michael@0: } val; michael@0: char buffer [512]; michael@0: };