GZipConstants.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. namespace ICSharpCode.SharpZipLib.GZip
  2. {
  3. /// <summary>
  4. /// This class contains constants used for gzip.
  5. /// </summary>
  6. sealed public class GZipConstants
  7. {
  8. /// <summary>
  9. /// Magic number found at start of GZIP header
  10. /// </summary>
  11. public const int GZIP_MAGIC = 0x1F8B;
  12. /* The flag byte is divided into individual bits as follows:
  13. bit 0 FTEXT
  14. bit 1 FHCRC
  15. bit 2 FEXTRA
  16. bit 3 FNAME
  17. bit 4 FCOMMENT
  18. bit 5 reserved
  19. bit 6 reserved
  20. bit 7 reserved
  21. */
  22. /// <summary>
  23. /// Flag bit mask for text
  24. /// </summary>
  25. public const int FTEXT = 0x1;
  26. /// <summary>
  27. /// Flag bitmask for Crc
  28. /// </summary>
  29. public const int FHCRC = 0x2;
  30. /// <summary>
  31. /// Flag bit mask for extra
  32. /// </summary>
  33. public const int FEXTRA = 0x4;
  34. /// <summary>
  35. /// flag bitmask for name
  36. /// </summary>
  37. public const int FNAME = 0x8;
  38. /// <summary>
  39. /// flag bit mask indicating comment is present
  40. /// </summary>
  41. public const int FCOMMENT = 0x10;
  42. /// <summary>
  43. /// Initialise default instance.
  44. /// </summary>
  45. /// <remarks>Constructor is private to prevent instances being created.</remarks>
  46. GZipConstants()
  47. {
  48. }
  49. }
  50. }