Mes documents/Visual Studio 2005/Projects/TES4ModTranslator/TES4ModTranslator/Zip/Compression/DeflaterConstants.cs

Go to the documentation of this file.
00001 // DeflaterConstants.cs
00002 //
00003 // Copyright (C) 2001 Mike Krueger
00004 // Copyright (C) 2004 John Reilly
00005 //
00006 // This file was translated from java, it was part of the GNU Classpath
00007 // Copyright (C) 2001 Free Software Foundation, Inc.
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with this program; if not, write to the Free Software
00021 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 //
00023 // Linking this library statically or dynamically with other modules is
00024 // making a combined work based on this library.  Thus, the terms and
00025 // conditions of the GNU General Public License cover the whole
00026 // combination.
00027 // 
00028 // As a special exception, the copyright holders of this library give you
00029 // permission to link this library with independent modules to produce an
00030 // executable, regardless of the license terms of these independent
00031 // modules, and to copy and distribute the resulting executable under
00032 // terms of your choice, provided that you also meet, for each linked
00033 // independent module, the terms and conditions of the license of that
00034 // module.  An independent module is a module which is not derived from
00035 // or based on this library.  If you modify this library, you may extend
00036 // this exception to your version of the library, but you are not
00037 // obligated to do so.  If you do not wish to do so, delete this
00038 // exception statement from your version.
00039 
00040 using System;
00041 
00042 namespace ICSharpCode.SharpZipLib.Zip.Compression 
00043 {
00044         
00048         public class DeflaterConstants 
00049         {
00053                 public const bool DEBUGGING = false;
00054                 
00058                 public const int STORED_BLOCK = 0;
00059                 
00063                 public const int STATIC_TREES = 1;
00064                 
00068                 public const int DYN_TREES    = 2;
00069                 
00073                 public const int PRESET_DICT  = 0x20;
00074                 
00078                 public const int DEFAULT_MEM_LEVEL = 8;
00079 
00083                 public const int MAX_MATCH = 258;
00084                 
00088                 public const int MIN_MATCH = 3;
00089                 
00093                 public const int MAX_WBITS = 15;
00094                 
00098                 public const int WSIZE = 1 << MAX_WBITS;
00099                 
00103                 public const int WMASK = WSIZE - 1;
00104                 
00108                 public const int HASH_BITS = DEFAULT_MEM_LEVEL + 7;
00109                 
00113                 public const int HASH_SIZE = 1 << HASH_BITS;
00114                 
00118                 public const int HASH_MASK = HASH_SIZE - 1;
00119                 
00123                 public const int HASH_SHIFT = (HASH_BITS + MIN_MATCH - 1) / MIN_MATCH;
00124                 
00128                 public const int MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1;
00129                 
00133                 public const int MAX_DIST = WSIZE - MIN_LOOKAHEAD;
00134                 
00138                 public const int PENDING_BUF_SIZE = 1 << (DEFAULT_MEM_LEVEL + 8);
00139                 
00143                 public static int MAX_BLOCK_SIZE = Math.Min(65535, PENDING_BUF_SIZE - 5);
00144                 
00148                 public const int DEFLATE_STORED = 0;
00149                 
00153                 public const int DEFLATE_FAST   = 1;
00154                 
00158                 public const int DEFLATE_SLOW   = 2;
00159                 
00163                 public static int[] GOOD_LENGTH = { 0, 4,  4,  4,  4,  8,   8,   8,   32,   32 };
00164                 
00168                 public static int[] MAX_LAZY    = { 0, 4,  5,  6,  4, 16,  16,  32,  128,  258 };
00169                 
00173                 public static int[] NICE_LENGTH = { 0, 8, 16, 32, 16, 32, 128, 128,  258,  258 };
00174                 
00178                 public static int[] MAX_CHAIN   = { 0, 4,  8, 32, 16, 32, 128, 256, 1024, 4096 };
00179                 
00183                 public static int[] COMPR_FUNC  = { 0, 1,  1,  1,  1,  2,   2,   2,    2,    2 };
00184                 
00185         }
00186 }

Generated on Fri Jun 23 21:50:04 2006 for OblivionModTranslator by  doxygen 1.4.6-NO