Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/Packaging/DotNetZip/Zlib/ZlibConstants.cs @ 12803

Last change on this file since 12803 was 12074, checked in by sraggl, 10 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 4.9 KB
Line 
1// ZlibConstants.cs
2// ------------------------------------------------------------------
3//
4// Copyright (c) 2009 Dino Chiesa and Microsoft Corporation. 
5// All rights reserved.
6//
7// This code module is part of DotNetZip, a zipfile class library.
8//
9// ------------------------------------------------------------------
10//
11// This code is licensed under the Microsoft Public License.
12// See the file License.txt for the license details.
13// More info on: http://dotnetzip.codeplex.com
14//
15// ------------------------------------------------------------------
16//
17// last saved (in emacs):
18// Time-stamp: <2009-November-03 18:50:19>
19//
20// ------------------------------------------------------------------
21//
22// This module defines constants used by the zlib class library.  This
23// code is derived from the jzlib implementation of zlib, but
24// significantly modified.  In keeping with the license for jzlib, the
25// copyright to that code is included here.
26//
27// ------------------------------------------------------------------
28//
29// Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
30//
31// Redistribution and use in source and binary forms, with or without
32// modification, are permitted provided that the following conditions are met:
33//
34// 1. Redistributions of source code must retain the above copyright notice,
35// this list of conditions and the following disclaimer.
36//
37// 2. Redistributions in binary form must reproduce the above copyright
38// notice, this list of conditions and the following disclaimer in
39// the documentation and/or other materials provided with the distribution.
40//
41// 3. The names of the authors may not be used to endorse or promote products
42// derived from this software without specific prior written permission.
43//
44// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
45// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
46// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
47// INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
48// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
50// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
51// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
52// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
53// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54//
55// -----------------------------------------------------------------------
56//
57// This program is based on zlib-1.1.3; credit to authors
58// Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
59// and contributors of zlib.
60//
61// -----------------------------------------------------------------------
62
63
64using System;
65
66namespace OfficeOpenXml.Packaging.Ionic.Zlib
67{
68    /// <summary>
69    /// A bunch of constants used in the Zlib interface.
70    /// </summary>
71    public static class ZlibConstants
72    {
73        /// <summary>
74        /// The maximum number of window bits for the Deflate algorithm.
75        /// </summary>
76        public const int WindowBitsMax = 15; // 32K LZ77 window
77
78        /// <summary>
79        /// The default number of window bits for the Deflate algorithm.
80        /// </summary>
81        public const int WindowBitsDefault = WindowBitsMax;
82
83        /// <summary>
84        /// indicates everything is A-OK
85        /// </summary>
86        public const int Z_OK = 0;
87
88        /// <summary>
89        /// Indicates that the last operation reached the end of the stream.
90        /// </summary>
91        public const int Z_STREAM_END = 1;
92
93        /// <summary>
94        /// The operation ended in need of a dictionary.
95        /// </summary>
96        public const int Z_NEED_DICT = 2;
97
98        /// <summary>
99        /// There was an error with the stream - not enough data, not open and readable, etc.
100        /// </summary>
101        public const int Z_STREAM_ERROR = -2;
102
103        /// <summary>
104        /// There was an error with the data - not enough data, bad data, etc.
105        /// </summary>
106        public const int Z_DATA_ERROR = -3;
107
108        /// <summary>
109        /// There was an error with the working buffer.
110        /// </summary>
111        public const int Z_BUF_ERROR = -5;
112
113        /// <summary>
114        /// The size of the working buffer used in the ZlibCodec class. Defaults to 8192 bytes.
115        /// </summary>
116#if NETCF       
117        public const int WorkingBufferSizeDefault = 8192;
118#else
119        public const int WorkingBufferSizeDefault = 16384;
120#endif
121        /// <summary>
122        /// The minimum size of the working buffer used in the ZlibCodec class.  Currently it is 128 bytes.
123        /// </summary>
124        public const int WorkingBufferSizeMin = 1024;
125    }
126
127}
128
Note: See TracBrowser for help on using the repository browser.