constants.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. 'use strict';
  2. module.exports = {
  3. /* Allowed flush values; see deflate() and inflate() below for details */
  4. Z_NO_FLUSH: 0,
  5. Z_PARTIAL_FLUSH: 1,
  6. Z_SYNC_FLUSH: 2,
  7. Z_FULL_FLUSH: 3,
  8. Z_FINISH: 4,
  9. Z_BLOCK: 5,
  10. Z_TREES: 6,
  11. /* Return codes for the compression/decompression functions. Negative values
  12. * are errors, positive values are used for special but normal events.
  13. */
  14. Z_OK: 0,
  15. Z_STREAM_END: 1,
  16. Z_NEED_DICT: 2,
  17. Z_ERRNO: -1,
  18. Z_STREAM_ERROR: -2,
  19. Z_DATA_ERROR: -3,
  20. //Z_MEM_ERROR: -4,
  21. Z_BUF_ERROR: -5,
  22. //Z_VERSION_ERROR: -6,
  23. /* compression levels */
  24. Z_NO_COMPRESSION: 0,
  25. Z_BEST_SPEED: 1,
  26. Z_BEST_COMPRESSION: 9,
  27. Z_DEFAULT_COMPRESSION: -1,
  28. Z_FILTERED: 1,
  29. Z_HUFFMAN_ONLY: 2,
  30. Z_RLE: 3,
  31. Z_FIXED: 4,
  32. Z_DEFAULT_STRATEGY: 0,
  33. /* Possible values of the data_type field (though see inflate()) */
  34. Z_BINARY: 0,
  35. Z_TEXT: 1,
  36. //Z_ASCII: 1, // = Z_TEXT (deprecated)
  37. Z_UNKNOWN: 2,
  38. /* The deflate compression method */
  39. Z_DEFLATED: 8
  40. //Z_NULL: null // Use -1 or null inline, depending on var type
  41. };