constants.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.constants = void 0;
  7. // Update with any zlib constants that are added or changed in the future.
  8. // Node v6 didn't export this, so we just hard code the version and rely
  9. // on all the other hard-coded values from zlib v4736. When node v6
  10. // support drops, we can just export the realZlibConstants object.
  11. const zlib_1 = __importDefault(require("zlib"));
  12. /* c8 ignore start */
  13. const realZlibConstants = zlib_1.default.constants || { ZLIB_VERNUM: 4736 };
  14. /* c8 ignore stop */
  15. exports.constants = Object.freeze(Object.assign(Object.create(null), {
  16. Z_NO_FLUSH: 0,
  17. Z_PARTIAL_FLUSH: 1,
  18. Z_SYNC_FLUSH: 2,
  19. Z_FULL_FLUSH: 3,
  20. Z_FINISH: 4,
  21. Z_BLOCK: 5,
  22. Z_OK: 0,
  23. Z_STREAM_END: 1,
  24. Z_NEED_DICT: 2,
  25. Z_ERRNO: -1,
  26. Z_STREAM_ERROR: -2,
  27. Z_DATA_ERROR: -3,
  28. Z_MEM_ERROR: -4,
  29. Z_BUF_ERROR: -5,
  30. Z_VERSION_ERROR: -6,
  31. Z_NO_COMPRESSION: 0,
  32. Z_BEST_SPEED: 1,
  33. Z_BEST_COMPRESSION: 9,
  34. Z_DEFAULT_COMPRESSION: -1,
  35. Z_FILTERED: 1,
  36. Z_HUFFMAN_ONLY: 2,
  37. Z_RLE: 3,
  38. Z_FIXED: 4,
  39. Z_DEFAULT_STRATEGY: 0,
  40. DEFLATE: 1,
  41. INFLATE: 2,
  42. GZIP: 3,
  43. GUNZIP: 4,
  44. DEFLATERAW: 5,
  45. INFLATERAW: 6,
  46. UNZIP: 7,
  47. BROTLI_DECODE: 8,
  48. BROTLI_ENCODE: 9,
  49. Z_MIN_WINDOWBITS: 8,
  50. Z_MAX_WINDOWBITS: 15,
  51. Z_DEFAULT_WINDOWBITS: 15,
  52. Z_MIN_CHUNK: 64,
  53. Z_MAX_CHUNK: Infinity,
  54. Z_DEFAULT_CHUNK: 16384,
  55. Z_MIN_MEMLEVEL: 1,
  56. Z_MAX_MEMLEVEL: 9,
  57. Z_DEFAULT_MEMLEVEL: 8,
  58. Z_MIN_LEVEL: -1,
  59. Z_MAX_LEVEL: 9,
  60. Z_DEFAULT_LEVEL: -1,
  61. BROTLI_OPERATION_PROCESS: 0,
  62. BROTLI_OPERATION_FLUSH: 1,
  63. BROTLI_OPERATION_FINISH: 2,
  64. BROTLI_OPERATION_EMIT_METADATA: 3,
  65. BROTLI_MODE_GENERIC: 0,
  66. BROTLI_MODE_TEXT: 1,
  67. BROTLI_MODE_FONT: 2,
  68. BROTLI_DEFAULT_MODE: 0,
  69. BROTLI_MIN_QUALITY: 0,
  70. BROTLI_MAX_QUALITY: 11,
  71. BROTLI_DEFAULT_QUALITY: 11,
  72. BROTLI_MIN_WINDOW_BITS: 10,
  73. BROTLI_MAX_WINDOW_BITS: 24,
  74. BROTLI_LARGE_MAX_WINDOW_BITS: 30,
  75. BROTLI_DEFAULT_WINDOW: 22,
  76. BROTLI_MIN_INPUT_BLOCK_BITS: 16,
  77. BROTLI_MAX_INPUT_BLOCK_BITS: 24,
  78. BROTLI_PARAM_MODE: 0,
  79. BROTLI_PARAM_QUALITY: 1,
  80. BROTLI_PARAM_LGWIN: 2,
  81. BROTLI_PARAM_LGBLOCK: 3,
  82. BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4,
  83. BROTLI_PARAM_SIZE_HINT: 5,
  84. BROTLI_PARAM_LARGE_WINDOW: 6,
  85. BROTLI_PARAM_NPOSTFIX: 7,
  86. BROTLI_PARAM_NDIRECT: 8,
  87. BROTLI_DECODER_RESULT_ERROR: 0,
  88. BROTLI_DECODER_RESULT_SUCCESS: 1,
  89. BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2,
  90. BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3,
  91. BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0,
  92. BROTLI_DECODER_PARAM_LARGE_WINDOW: 1,
  93. BROTLI_DECODER_NO_ERROR: 0,
  94. BROTLI_DECODER_SUCCESS: 1,
  95. BROTLI_DECODER_NEEDS_MORE_INPUT: 2,
  96. BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3,
  97. BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1,
  98. BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2,
  99. BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3,
  100. BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4,
  101. BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5,
  102. BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6,
  103. BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7,
  104. BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8,
  105. BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9,
  106. BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10,
  107. BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11,
  108. BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12,
  109. BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13,
  110. BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14,
  111. BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15,
  112. BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16,
  113. BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19,
  114. BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20,
  115. BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21,
  116. BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22,
  117. BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25,
  118. BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26,
  119. BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
  120. BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
  121. BROTLI_DECODER_ERROR_UNREACHABLE: -31,
  122. }, realZlibConstants));
  123. //# sourceMappingURL=constants.js.map