constants.js 1.3 KB

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