ZipVersion.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This file is part of the nelexa/zip package.
  5. * (c) Ne-Lexa <https://github.com/Ne-Lexa/php-zip>
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. namespace PhpZip\Constants;
  10. /**
  11. * Version needed to extract or software version.
  12. *
  13. * @see https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT Section 4.4.3
  14. */
  15. interface ZipVersion
  16. {
  17. /** @var int 1.0 - Default value */
  18. public const v10_DEFAULT_MIN = 10;
  19. /** @var int 1.1 - File is a volume label */
  20. public const v11_FILE_VOLUME_LABEL = 11;
  21. /**
  22. * 2.0 - File is a folder (directory)
  23. * 2.0 - File is compressed using Deflate compression
  24. * 2.0 - File is encrypted using traditional PKWARE encryption.
  25. *
  26. * @var int
  27. */
  28. public const v20_DEFLATED_FOLDER_ZIPCRYPTO = 20;
  29. /** @var int 2.1 - File is compressed using Deflate64(tm) */
  30. public const v21_DEFLATED64 = 21;
  31. /** @var int 2.5 - File is compressed using PKWARE DCL Implode */
  32. public const v25_IMPLODED = 25;
  33. /** @var int 2.7 - File is a patch data set */
  34. public const v27_PATCH_DATA = 27;
  35. /** @var int 4.5 - File uses ZIP64 format extensions */
  36. public const v45_ZIP64_EXT = 45;
  37. /** @var int 4.6 - File is compressed using BZIP2 compression */
  38. public const v46_BZIP2 = 46;
  39. /**
  40. * 5.0 - File is encrypted using DES
  41. * 5.0 - File is encrypted using 3DES
  42. * 5.0 - File is encrypted using original RC2 encryption
  43. * 5.0 - File is encrypted using RC4 encryption.
  44. *
  45. * @var int
  46. */
  47. public const v50_ENCR_DES_3DES_RC2_ORIG_RC4 = 50;
  48. /**
  49. * 5.1 - File is encrypted using AES encryption
  50. * 5.1 - File is encrypted using corrected RC2 encryption**.
  51. *
  52. * @var int
  53. */
  54. public const v51_ENCR_AES_RC2_CORRECT = 51;
  55. /** @var int 5.2 - File is encrypted using corrected RC2-64 encryption** */
  56. public const v52_ENCR_RC2_64_CORRECT = 52;
  57. /** @var int 6.1 - File is encrypted using non-OAEP key wrapping*** */
  58. public const v61_ENCR_NON_OAE_KEY_WRAP = 61;
  59. /** @var int 6.2 - Central directory encryption */
  60. public const v62_ENCR_CENTRAL_DIR = 62;
  61. /**
  62. * 6.3 - File is compressed using LZMA
  63. * 6.3 - File is compressed using PPMd+
  64. * 6.3 - File is encrypted using Blowfish
  65. * 6.3 - File is encrypted using Twofish.
  66. *
  67. * @var int
  68. */
  69. public const v63_LZMA_PPMD_BLOWFISH_TWOFISH = 63;
  70. }