~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/kernel/src/zip_internal.hrl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%% ``The contents of this file are subject to the Erlang Public License,
 
2
%% Version 1.1, (the "License"); you may not use this file except in
 
3
%% compliance with the License. You should have received a copy of the
 
4
%% Erlang Public License along with this software. If not, it can be
 
5
%% retrieved via the world wide web at http://www.erlang.org/.
 
6
%% 
 
7
%% Software distributed under the License is distributed on an "AS IS"
 
8
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
9
%% the License for the specific language governing rights and limitations
 
10
%% under the License.
 
11
%% 
 
12
%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
 
13
%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
 
14
%% AB. All Rights Reserved.''
 
15
%% 
 
16
%%     $Id$
 
17
%%
 
18
 
 
19
%% ZIP-file format records and defines
 
20
 
 
21
%% compression methods
 
22
-define(STORED, 0).
 
23
-define(UNCOMPRESSED, 0).
 
24
-define(SHRUNK, 1).
 
25
-define(REDUCED_1, 2).
 
26
-define(REDUCED_2, 3).
 
27
-define(REDUCED_3, 4).
 
28
-define(REDUCED_4, 5).
 
29
-define(IMPLODED, 6).
 
30
-define(TOKENIZED, 7).
 
31
-define(DEFLATED, 8).
 
32
-define(DEFLATED_64, 9).
 
33
-define(PKWARE_IMPLODED, 10).
 
34
-define(PKWARE_RESERVED, 11).
 
35
-define(BZIP2_COMPRESSED, 12).
 
36
 
 
37
%% zip-file records
 
38
-define(LOCAL_FILE_MAGIC,16#04034b50).
 
39
-define(LOCAL_FILE_HEADER_SZ,(4+2+2+2+2+2+4+4+4+2+2)).
 
40
-define(LOCAL_FILE_HEADER_CRC32_OFFSET, 4+2+2+2+2+2).
 
41
-record(local_file_header, {version_needed,
 
42
                            gp_flag,
 
43
                            comp_method,
 
44
                            last_mod_time,
 
45
                            last_mod_date,
 
46
                            crc32,
 
47
                            comp_size,
 
48
                            uncomp_size,
 
49
                            file_name_length,
 
50
                            extra_field_length}).
 
51
 
 
52
-define(CENTRAL_FILE_HEADER_SZ,(4+2+2+2+2+2+2+4+4+4+2+2+2+2+2+4+4)).
 
53
 
 
54
-define(CENTRAL_DIR_MAGIC, 16#06054b50).
 
55
-define(CENTRAL_DIR_SZ, (4+2+2+2+2+4+4+2)).
 
56
-define(CENTRAL_DIR_DIGITAL_SIG_MAGIC, 16#05054b50).
 
57
-define(CENTRAL_DIR_DIGITAL_SIG_SZ, (4+2)).
 
58
 
 
59
-define(CENTRAL_FILE_MAGIC, 16#02014b50).
 
60
 
 
61
-record(cd_file_header, {version_made_by,
 
62
                         version_needed,
 
63
                         gp_flag,
 
64
                         comp_method,
 
65
                         last_mod_time,
 
66
                         last_mod_date,
 
67
                         crc32,
 
68
                         comp_size,
 
69
                         uncomp_size,
 
70
                         file_name_length,
 
71
                         extra_field_length,
 
72
                         file_comment_length,
 
73
                         disk_num_start,
 
74
                         internal_attr,
 
75
                         external_attr,
 
76
                         local_header_offset}).
 
77
 
 
78
%% Unix extra fields (not yet supported)
 
79
-define(UNIX_EXTRA_FIELD_TAG, 16#000d).
 
80
-record(unix_extra_field, {atime,
 
81
                           mtime,
 
82
                           uid,
 
83
                           gid}).
 
84
 
 
85
%% extended timestamps (not yet supported)
 
86
-define(EXTENDED_TIMESTAMP_TAG, 16#5455).
 
87
-record(extended_timestamp, {mtime,
 
88
                             atime,
 
89
                             ctime}).
 
90
 
 
91
-define(END_OF_CENTRAL_DIR_MAGIC, 16#06054b50).
 
92
-define(END_OF_CENTRAL_DIR_SZ, (4+2+2+2+2+4+4+2)).
 
93
 
 
94
-record(eocd, {disk_num,
 
95
               start_disk_num,
 
96
               entries_on_disk,
 
97
               entries,
 
98
               size,
 
99
               offset,
 
100
               zip_comment_length}).
 
101
 
 
102