11cb0ef41Sopenharmony_ci// Update with any zlib constants that are added or changed in the future.
21cb0ef41Sopenharmony_ci// Node v6 didn't export this, so we just hard code the version and rely
31cb0ef41Sopenharmony_ci// on all the other hard-coded values from zlib v4736.  When node v6
41cb0ef41Sopenharmony_ci// support drops, we can just export the realZlibConstants object.
51cb0ef41Sopenharmony_ciconst realZlibConstants = require('zlib').constants ||
61cb0ef41Sopenharmony_ci  /* istanbul ignore next */ { ZLIB_VERNUM: 4736 }
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_cimodule.exports = Object.freeze(Object.assign(Object.create(null), {
91cb0ef41Sopenharmony_ci  Z_NO_FLUSH: 0,
101cb0ef41Sopenharmony_ci  Z_PARTIAL_FLUSH: 1,
111cb0ef41Sopenharmony_ci  Z_SYNC_FLUSH: 2,
121cb0ef41Sopenharmony_ci  Z_FULL_FLUSH: 3,
131cb0ef41Sopenharmony_ci  Z_FINISH: 4,
141cb0ef41Sopenharmony_ci  Z_BLOCK: 5,
151cb0ef41Sopenharmony_ci  Z_OK: 0,
161cb0ef41Sopenharmony_ci  Z_STREAM_END: 1,
171cb0ef41Sopenharmony_ci  Z_NEED_DICT: 2,
181cb0ef41Sopenharmony_ci  Z_ERRNO: -1,
191cb0ef41Sopenharmony_ci  Z_STREAM_ERROR: -2,
201cb0ef41Sopenharmony_ci  Z_DATA_ERROR: -3,
211cb0ef41Sopenharmony_ci  Z_MEM_ERROR: -4,
221cb0ef41Sopenharmony_ci  Z_BUF_ERROR: -5,
231cb0ef41Sopenharmony_ci  Z_VERSION_ERROR: -6,
241cb0ef41Sopenharmony_ci  Z_NO_COMPRESSION: 0,
251cb0ef41Sopenharmony_ci  Z_BEST_SPEED: 1,
261cb0ef41Sopenharmony_ci  Z_BEST_COMPRESSION: 9,
271cb0ef41Sopenharmony_ci  Z_DEFAULT_COMPRESSION: -1,
281cb0ef41Sopenharmony_ci  Z_FILTERED: 1,
291cb0ef41Sopenharmony_ci  Z_HUFFMAN_ONLY: 2,
301cb0ef41Sopenharmony_ci  Z_RLE: 3,
311cb0ef41Sopenharmony_ci  Z_FIXED: 4,
321cb0ef41Sopenharmony_ci  Z_DEFAULT_STRATEGY: 0,
331cb0ef41Sopenharmony_ci  DEFLATE: 1,
341cb0ef41Sopenharmony_ci  INFLATE: 2,
351cb0ef41Sopenharmony_ci  GZIP: 3,
361cb0ef41Sopenharmony_ci  GUNZIP: 4,
371cb0ef41Sopenharmony_ci  DEFLATERAW: 5,
381cb0ef41Sopenharmony_ci  INFLATERAW: 6,
391cb0ef41Sopenharmony_ci  UNZIP: 7,
401cb0ef41Sopenharmony_ci  BROTLI_DECODE: 8,
411cb0ef41Sopenharmony_ci  BROTLI_ENCODE: 9,
421cb0ef41Sopenharmony_ci  Z_MIN_WINDOWBITS: 8,
431cb0ef41Sopenharmony_ci  Z_MAX_WINDOWBITS: 15,
441cb0ef41Sopenharmony_ci  Z_DEFAULT_WINDOWBITS: 15,
451cb0ef41Sopenharmony_ci  Z_MIN_CHUNK: 64,
461cb0ef41Sopenharmony_ci  Z_MAX_CHUNK: Infinity,
471cb0ef41Sopenharmony_ci  Z_DEFAULT_CHUNK: 16384,
481cb0ef41Sopenharmony_ci  Z_MIN_MEMLEVEL: 1,
491cb0ef41Sopenharmony_ci  Z_MAX_MEMLEVEL: 9,
501cb0ef41Sopenharmony_ci  Z_DEFAULT_MEMLEVEL: 8,
511cb0ef41Sopenharmony_ci  Z_MIN_LEVEL: -1,
521cb0ef41Sopenharmony_ci  Z_MAX_LEVEL: 9,
531cb0ef41Sopenharmony_ci  Z_DEFAULT_LEVEL: -1,
541cb0ef41Sopenharmony_ci  BROTLI_OPERATION_PROCESS: 0,
551cb0ef41Sopenharmony_ci  BROTLI_OPERATION_FLUSH: 1,
561cb0ef41Sopenharmony_ci  BROTLI_OPERATION_FINISH: 2,
571cb0ef41Sopenharmony_ci  BROTLI_OPERATION_EMIT_METADATA: 3,
581cb0ef41Sopenharmony_ci  BROTLI_MODE_GENERIC: 0,
591cb0ef41Sopenharmony_ci  BROTLI_MODE_TEXT: 1,
601cb0ef41Sopenharmony_ci  BROTLI_MODE_FONT: 2,
611cb0ef41Sopenharmony_ci  BROTLI_DEFAULT_MODE: 0,
621cb0ef41Sopenharmony_ci  BROTLI_MIN_QUALITY: 0,
631cb0ef41Sopenharmony_ci  BROTLI_MAX_QUALITY: 11,
641cb0ef41Sopenharmony_ci  BROTLI_DEFAULT_QUALITY: 11,
651cb0ef41Sopenharmony_ci  BROTLI_MIN_WINDOW_BITS: 10,
661cb0ef41Sopenharmony_ci  BROTLI_MAX_WINDOW_BITS: 24,
671cb0ef41Sopenharmony_ci  BROTLI_LARGE_MAX_WINDOW_BITS: 30,
681cb0ef41Sopenharmony_ci  BROTLI_DEFAULT_WINDOW: 22,
691cb0ef41Sopenharmony_ci  BROTLI_MIN_INPUT_BLOCK_BITS: 16,
701cb0ef41Sopenharmony_ci  BROTLI_MAX_INPUT_BLOCK_BITS: 24,
711cb0ef41Sopenharmony_ci  BROTLI_PARAM_MODE: 0,
721cb0ef41Sopenharmony_ci  BROTLI_PARAM_QUALITY: 1,
731cb0ef41Sopenharmony_ci  BROTLI_PARAM_LGWIN: 2,
741cb0ef41Sopenharmony_ci  BROTLI_PARAM_LGBLOCK: 3,
751cb0ef41Sopenharmony_ci  BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4,
761cb0ef41Sopenharmony_ci  BROTLI_PARAM_SIZE_HINT: 5,
771cb0ef41Sopenharmony_ci  BROTLI_PARAM_LARGE_WINDOW: 6,
781cb0ef41Sopenharmony_ci  BROTLI_PARAM_NPOSTFIX: 7,
791cb0ef41Sopenharmony_ci  BROTLI_PARAM_NDIRECT: 8,
801cb0ef41Sopenharmony_ci  BROTLI_DECODER_RESULT_ERROR: 0,
811cb0ef41Sopenharmony_ci  BROTLI_DECODER_RESULT_SUCCESS: 1,
821cb0ef41Sopenharmony_ci  BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2,
831cb0ef41Sopenharmony_ci  BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3,
841cb0ef41Sopenharmony_ci  BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0,
851cb0ef41Sopenharmony_ci  BROTLI_DECODER_PARAM_LARGE_WINDOW: 1,
861cb0ef41Sopenharmony_ci  BROTLI_DECODER_NO_ERROR: 0,
871cb0ef41Sopenharmony_ci  BROTLI_DECODER_SUCCESS: 1,
881cb0ef41Sopenharmony_ci  BROTLI_DECODER_NEEDS_MORE_INPUT: 2,
891cb0ef41Sopenharmony_ci  BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3,
901cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1,
911cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2,
921cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3,
931cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4,
941cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5,
951cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6,
961cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7,
971cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8,
981cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9,
991cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10,
1001cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11,
1011cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12,
1021cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13,
1031cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14,
1041cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15,
1051cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16,
1061cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19,
1071cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20,
1081cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21,
1091cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22,
1101cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25,
1111cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26,
1121cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
1131cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
1141cb0ef41Sopenharmony_ci  BROTLI_DECODER_ERROR_UNREACHABLE: -31,
1151cb0ef41Sopenharmony_ci}, realZlibConstants))
116