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