annotate Zip/Compression/DeflaterConstants.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 // DeflaterConstants.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 // Copyright (C) 2004 John Reilly
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 //
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 // 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
7 // 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
8 //
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 // 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
10 // 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
11 // 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
12 // 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
13 //
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 // 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
15 // 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
16 // 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
17 // 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
18 //
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 // 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
20 // 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
21 // 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
22 //
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 // 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
24 // 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
25 // 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
26 // 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
27 //
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 // 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
29 // 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
30 // 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
31 // 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
32 // 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
33 // 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
34 // 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
35 // 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
36 // 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
37 // 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
38 // 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
39
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 using System;
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 namespace ICSharpCode.SharpZipLib.Zip.Compression
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 {
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
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 /// <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
46 /// This class contains constants used for deflation.
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 public class DeflaterConstants
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 {
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 /// <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
51 /// Set to true to enable debugging
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 /// </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
53 public const bool DEBUGGING = false;
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
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 /// <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
56 /// Written to Zip file to identify a stored block
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 /// </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
58 public const int STORED_BLOCK = 0;
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
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 /// <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
61 /// Identifies static tree in Zip file
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 /// </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
63 public const int STATIC_TREES = 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
64
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 /// <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
66 /// Identifies dynamic tree in Zip file
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 /// </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
68 public const int DYN_TREES = 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
69
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 /// <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
71 /// Header flag indicating a preset dictionary for deflation
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 /// </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
73 public const int PRESET_DICT = 0x20;
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
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 /// <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
76 /// Sets internal buffer sizes for Huffman encoding
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 /// </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
78 public const int DEFAULT_MEM_LEVEL = 8;
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
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 /// <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
81 /// Internal compression engine constant
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 /// </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
83 public const int MAX_MATCH = 258;
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
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 /// <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
86 /// Internal compression engine constant
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 /// </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
88 public const int MIN_MATCH = 3;
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
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 /// <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
91 /// Internal compression engine constant
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 /// </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
93 public const int MAX_WBITS = 15;
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 /// <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
96 /// Internal compression engine constant
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 /// </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
98 public const int WSIZE = 1 << MAX_WBITS;
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
100 /// <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
101 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 /// </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
103 public const int WMASK = WSIZE - 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
104
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105 /// <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
106 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 /// </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
108 public const int HASH_BITS = DEFAULT_MEM_LEVEL + 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
109
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 /// <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
111 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 /// </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
113 public const int HASH_SIZE = 1 << HASH_BITS;
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
114
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 /// <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
116 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
117 /// </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
118 public const int HASH_MASK = HASH_SIZE - 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
119
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
120 /// <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
121 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
122 /// </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
123 public const int HASH_SHIFT = (HASH_BITS + MIN_MATCH - 1) / MIN_MATCH;
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
124
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
125 /// <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
126 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
127 /// </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
128 public const int MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 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
129
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
130 /// <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
131 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
132 /// </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
133 public const int MAX_DIST = WSIZE - MIN_LOOKAHEAD;
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
134
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
135 /// <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
136 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
137 /// </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
138 public const int PENDING_BUF_SIZE = 1 << (DEFAULT_MEM_LEVEL + 8);
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
139
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
140 /// <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
141 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
142 /// </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
143 public static int MAX_BLOCK_SIZE = Math.Min(65535, PENDING_BUF_SIZE - 5);
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
144
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
145 /// <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
146 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147 /// </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
148 public const int DEFLATE_STORED = 0;
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
149
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
150 /// <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
151 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
152 /// </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
153 public const int DEFLATE_FAST = 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
154
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
155 /// <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
156 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
157 /// </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
158 public const int DEFLATE_SLOW = 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
159
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
160 /// <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
161 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
162 /// </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
163 public static int[] GOOD_LENGTH = { 0, 4, 4, 4, 4, 8, 8, 8, 32, 32 };
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
164
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
165 /// <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
166 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
167 /// </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
168 public static int[] MAX_LAZY = { 0, 4, 5, 6, 4, 16, 16, 32, 128, 258 };
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
169
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
170 /// <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
171 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
172 /// </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
173 public static int[] NICE_LENGTH = { 0, 8, 16, 32, 16, 32, 128, 128, 258, 258 };
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
174
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
175 /// <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
176 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
177 /// </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
178 public static int[] MAX_CHAIN = { 0, 4, 8, 32, 16, 32, 128, 256, 1024, 4096 };
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
179
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
180 /// <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
181 /// Internal compression engine constant
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
182 /// </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
183 public static int[] COMPR_FUNC = { 0, 1, 1, 1, 1, 2, 2, 2, 2, 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
184
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
185 }
94e25b786321 Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
186 }