CompressionMethod.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. declare(strict_types=1);
  3. namespace ZipStream;
  4. enum CompressionMethod: int
  5. {
  6. /**
  7. * The file is stored (no compression)
  8. */
  9. case STORE = 0x00;
  10. // 0x01: legacy algorithm - The file is Shrunk
  11. // 0x02: legacy algorithm - The file is Reduced with compression factor 1
  12. // 0x03: legacy algorithm - The file is Reduced with compression factor 2
  13. // 0x04: legacy algorithm - The file is Reduced with compression factor 3
  14. // 0x05: legacy algorithm - The file is Reduced with compression factor 4
  15. // 0x06: legacy algorithm - The file is Imploded
  16. // 0x07: Reserved for Tokenizing compression algorithm
  17. /**
  18. * The file is Deflated
  19. */
  20. case DEFLATE = 0x08;
  21. // /**
  22. // * Enhanced Deflating using Deflate64(tm)
  23. // */
  24. // case DEFLATE_64 = 0x09;
  25. // /**
  26. // * PKWARE Data Compression Library Imploding (old IBM TERSE)
  27. // */
  28. // case PKWARE = 0x0a;
  29. // // 0x0b: Reserved by PKWARE
  30. // /**
  31. // * File is compressed using BZIP2 algorithm
  32. // */
  33. // case BZIP2 = 0x0c;
  34. // // 0x0d: Reserved by PKWARE
  35. // /**
  36. // * LZMA
  37. // */
  38. // case LZMA = 0x0e;
  39. // // 0x0f: Reserved by PKWARE
  40. // /**
  41. // * IBM z/OS CMPSC Compression
  42. // */
  43. // case IBM_ZOS_CMPSC = 0x10;
  44. // // 0x11: Reserved by PKWARE
  45. // /**
  46. // * File is compressed using IBM TERSE
  47. // */
  48. // case IBM_TERSE = 0x12;
  49. // /**
  50. // * IBM LZ77 z Architecture
  51. // */
  52. // case IBM_LZ77 = 0x13;
  53. // // 0x14: deprecated (use method 93 for zstd)
  54. // /**
  55. // * Zstandard (zstd) Compression
  56. // */
  57. // case ZSTD = 0x5d;
  58. // /**
  59. // * MP3 Compression
  60. // */
  61. // case MP3 = 0x5e;
  62. // /**
  63. // * XZ Compression
  64. // */
  65. // case XZ = 0x5f;
  66. // /**
  67. // * JPEG variant
  68. // */
  69. // case JPEG = 0x60;
  70. // /**
  71. // * WavPack compressed data
  72. // */
  73. // case WAV_PACK = 0x61;
  74. // /**
  75. // * PPMd version I, Rev 1
  76. // */
  77. // case PPMD_1_1 = 0x62;
  78. // /**
  79. // * AE-x encryption marker
  80. // */
  81. // case AE_X_ENCRYPTION = 0x63;
  82. }