security/nss/lib/jar/jarfile.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/jar/jarfile.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,76 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +/*
     1.9 + *  JARFILE.H
    1.10 + *
    1.11 + *  Certain constants and structures for the archive format.
    1.12 + *
    1.13 + */
    1.14 +
    1.15 +/* ZIP */
    1.16 +struct ZipLocal {		/* 30 bytes */
    1.17 +    char signature [4];
    1.18 +    char word [2];
    1.19 +    char bitflag [2];
    1.20 +    char method [2];
    1.21 +    char time [2];
    1.22 +    char date [2];
    1.23 +    char crc32 [4];
    1.24 +    char size [4];
    1.25 +    char orglen [4];
    1.26 +    char filename_len [2];
    1.27 +    char extrafield_len [2];
    1.28 +};
    1.29 +
    1.30 +struct ZipCentral {		/* 46 bytes */
    1.31 +    char signature [4];
    1.32 +    char version_made_by [2];
    1.33 +    char version [2];
    1.34 +    char bitflag [2];
    1.35 +    char method [2];
    1.36 +    char time [2];
    1.37 +    char date [2];
    1.38 +    char crc32 [4];
    1.39 +    char size [4];
    1.40 +    char orglen [4];
    1.41 +    char filename_len [2];
    1.42 +    char extrafield_len [2];
    1.43 +    char commentfield_len [2];
    1.44 +    char diskstart_number [2];
    1.45 +    char internal_attributes [2];
    1.46 +    char external_attributes [4];
    1.47 +    char localhdr_offset [4];
    1.48 +};
    1.49 +
    1.50 +struct ZipEnd {			/* 22 bytes */
    1.51 +    char signature [4];
    1.52 +    char disk_nr [2];
    1.53 +    char start_central_dir [2];
    1.54 +    char total_entries_disk [2];
    1.55 +    char total_entries_archive [2];
    1.56 +    char central_dir_size [4];
    1.57 +    char offset_central_dir [4];
    1.58 +    char commentfield_len [2];
    1.59 +};
    1.60 +
    1.61 +#define LSIG 0x04034B50l
    1.62 +#define CSIG 0x02014B50l
    1.63 +#define ESIG 0x06054B50l
    1.64 +
    1.65 +/* TAR */
    1.66 +union TarEntry {		/* 512 bytes */
    1.67 +    struct header {		/* 257 bytes */
    1.68 +	char filename [100];
    1.69 +	char mode [8];
    1.70 +	char uid [8];
    1.71 +	char gid [8];
    1.72 +	char size [12];
    1.73 +	char time [12];
    1.74 +	char checksum [8];
    1.75 +	char linkflag;
    1.76 +	char linkname [100];
    1.77 +    } val;
    1.78 +    char buffer [512];
    1.79 +};

mercurial