Mercurial > repos > SharpZipLib
annotate GZip/GZIPConstants.cs @ 10:627dcbca86fc default tip
* Update standard .csproj with MonoDevelop-initiated cleanup
* Add Mono for Android version of .csproj file
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Jul 2012 15:25:26 +0100 |
parents | 94e25b786321 |
children |
rev | line source |
---|---|
1
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 // GZipConstants.cs |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 // |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
3 // Copyright (C) 2001 Mike Krueger |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 // |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 // This file was translated from java, it was part of the GNU Classpath |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 // Copyright (C) 2001 Free Software Foundation, Inc. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 // |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 // This program is free software; you can redistribute it and/or |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 // modify it under the terms of the GNU General Public License |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 // as published by the Free Software Foundation; either version 2 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 // of the License, or (at your option) any later version. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 // |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 // This program is distributed in the hope that it will be useful, |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
16 // GNU General Public License for more details. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
17 // |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 // You should have received a copy of the GNU General Public License |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 // along with this program; if not, write to the Free Software |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 // |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 // Linking this library statically or dynamically with other modules is |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 // making a combined work based on this library. Thus, the terms and |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 // conditions of the GNU General Public License cover the whole |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 // combination. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 // |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 // As a special exception, the copyright holders of this library give you |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 // permission to link this library with independent modules to produce an |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 // executable, regardless of the license terms of these independent |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 // modules, and to copy and distribute the resulting executable under |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
31 // terms of your choice, provided that you also meet, for each linked |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
32 // independent module, the terms and conditions of the license of that |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
33 // module. An independent module is a module which is not derived from |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
34 // or based on this library. If you modify this library, you may extend |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
35 // this exception to your version of the library, but you are not |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
36 // obligated to do so. If you do not wish to do so, delete this |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
37 // exception statement from your version. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
38 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
39 namespace ICSharpCode.SharpZipLib.GZip |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
40 { |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
41 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
42 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
43 /// This class contains constants used for gzip. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
44 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
45 sealed public class GZipConstants |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
46 { |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
47 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
48 /// Magic number found at start of GZIP header |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
49 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
50 public const int GZIP_MAGIC = 0x1F8B; |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
51 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
52 /* The flag byte is divided into individual bits as follows: |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
53 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
54 bit 0 FTEXT |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
55 bit 1 FHCRC |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
56 bit 2 FEXTRA |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
57 bit 3 FNAME |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
58 bit 4 FCOMMENT |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
59 bit 5 reserved |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
60 bit 6 reserved |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
61 bit 7 reserved |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
62 */ |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
63 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
64 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
65 /// Flag bit mask for text |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
66 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
67 public const int FTEXT = 0x1; |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
68 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
69 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
70 /// Flag bitmask for Crc |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
71 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
72 public const int FHCRC = 0x2; |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
73 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
74 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
75 /// Flag bit mask for extra |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
76 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
77 public const int FEXTRA = 0x4; |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
78 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
79 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
80 /// flag bitmask for name |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
81 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
82 public const int FNAME = 0x8; |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
83 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
84 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
85 /// flag bit mask indicating comment is present |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
86 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
87 public const int FCOMMENT = 0x10; |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
88 |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
89 /// <summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
90 /// Initialise default instance. |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
91 /// </summary> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
92 /// <remarks>Constructor is private to prevent instances being created.</remarks> |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
93 GZipConstants() |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
94 { |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
95 } |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
96 } |
94e25b786321
Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
97 } |