Packages

trait Zlib extends Object with IEventEmitter with UncategorizedConstants with ZlibConstants

This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. Each class takes the same options, and is a readable/writable Stream.

Annotations
@RawJSType() @native()
See also

https://nodejs.org/docs/latest/api/zlib.html

Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Zlib
  2. ZlibConstants
  3. UncategorizedConstants
  4. IEventEmitter
  5. Object
  6. Any
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val DEFLATE: Int
    Definition Classes
    UncategorizedConstants
  5. val DEFLATERAW: Int
    Definition Classes
    UncategorizedConstants
  6. val GUNZIP: Int
    Definition Classes
    UncategorizedConstants
  7. val GZIP: Int
    Definition Classes
    UncategorizedConstants
  8. val INFLATE: Int
    Definition Classes
    UncategorizedConstants
  9. val INFLATERAW: Int
    Definition Classes
    UncategorizedConstants
  10. val UNZIP: Int
    Definition Classes
    UncategorizedConstants
  11. val ZLIB_VERNUM: Int
    Definition Classes
    UncategorizedConstants
  12. val Z_ASCII: DataType
    Definition Classes
    ZlibConstants
  13. val Z_BEST_COMPRESSION: CompressionLevel
    Definition Classes
    ZlibConstants
  14. val Z_BEST_SPEED: CompressionLevel
    Definition Classes
    ZlibConstants
  15. val Z_BINARY: DataType
    Definition Classes
    ZlibConstants
  16. val Z_BLOCK: CompressionFlush
    Definition Classes
    ZlibConstants
  17. val Z_BUF_ERROR: CompressionFunction
    Definition Classes
    ZlibConstants
  18. val Z_DATA_ERROR: CompressionFunction
    Definition Classes
    ZlibConstants
  19. val Z_DEFAULT_CHUNK: Int
    Definition Classes
    ZlibConstants
  20. val Z_DEFAULT_COMPRESSION: CompressionLevel
    Definition Classes
    ZlibConstants
  21. val Z_DEFAULT_LEVEL: Int
    Definition Classes
    ZlibConstants
  22. val Z_DEFAULT_MEMLEVEL: Int
    Definition Classes
    ZlibConstants
  23. val Z_DEFAULT_STRATEGY: CompressionStrategy
    Definition Classes
    ZlibConstants
  24. val Z_DEFAULT_WINDOWBITS: Int
    Definition Classes
    ZlibConstants
  25. val Z_DEFLATED: DeflateCompressMethod
    Definition Classes
    ZlibConstants
  26. val Z_ERRNO: CompressionFunction
    Definition Classes
    ZlibConstants
  27. val Z_FILTERED: CompressionStrategy
    Definition Classes
    ZlibConstants
  28. val Z_FINISH: CompressionFlush
    Definition Classes
    ZlibConstants
  29. val Z_FIXED: CompressionStrategy
    Definition Classes
    ZlibConstants
  30. val Z_FULL_FLUSH: CompressionFlush
    Definition Classes
    ZlibConstants
  31. val Z_HUFFMAN_ONLY: CompressionStrategy
    Definition Classes
    ZlibConstants
  32. val Z_MAX_CHUNK: Double
    Definition Classes
    ZlibConstants
  33. val Z_MAX_LEVEL: Int
    Definition Classes
    ZlibConstants
  34. val Z_MAX_MEMLEVEL: Int
    Definition Classes
    ZlibConstants
  35. val Z_MAX_WINDOWBITS: Int
    Definition Classes
    ZlibConstants
  36. val Z_MEM_ERROR: CompressionFunction
    Definition Classes
    ZlibConstants
  37. val Z_MIN_CHUNK: Int
    Definition Classes
    ZlibConstants
  38. val Z_MIN_LEVEL: Int
    Definition Classes
    ZlibConstants
  39. val Z_MIN_MEMLEVEL: Int
    Definition Classes
    ZlibConstants
  40. val Z_MIN_WINDOWBITS: Int
    Definition Classes
    ZlibConstants
  41. val Z_NEED_DICT: CompressionFunction
    Definition Classes
    ZlibConstants
  42. val Z_NO_COMPRESSION: CompressionLevel
    Definition Classes
    ZlibConstants
  43. val Z_NO_FLUSH: CompressionFlush
    Definition Classes
    ZlibConstants
  44. val Z_NULL: AllocationType
    Definition Classes
    ZlibConstants
  45. val Z_OK: CompressionFunction
    Definition Classes
    ZlibConstants
  46. val Z_PARTIAL_FLUSH: CompressionFlush
    Definition Classes
    ZlibConstants
  47. val Z_RLE: CompressionStrategy
    Definition Classes
    ZlibConstants
  48. val Z_STREAM_END: CompressionFunction
    Definition Classes
    ZlibConstants
  49. val Z_STREAM_ERROR: CompressionFunction
    Definition Classes
    ZlibConstants
  50. val Z_SYNC_FLUSH: CompressionFlush
    Definition Classes
    ZlibConstants
  51. val Z_TEXT: DataType
    Definition Classes
    ZlibConstants
  52. val Z_TREES: CompressionFlush
    Definition Classes
    ZlibConstants
  53. val Z_UNKNOWN: DataType
    Definition Classes
    ZlibConstants
  54. val Z_VERSION_ERROR: CompressionFunction
    Definition Classes
    ZlibConstants
  55. def addListener(eventName: String, listener: Function): Zlib.this.type

    Alias for emitter.on(eventName, listener).

    Alias for emitter.on(eventName, listener).

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.addListener(eventName, listener)

    See also

    on()

  56. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  57. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  58. def createDeflate(options: CompressionOptions): Deflate

    Returns a new Deflate object with an options.

    Returns a new Deflate object with an options.

    Example:
    1. zlib.createDeflate(options)

  59. def createDeflateRaw(options: CompressionOptions = js.native): DeflateRaw

    Returns a new DeflateRaw object with an options.

    Returns a new DeflateRaw object with an options.

    Example:
    1. zlib.createDeflateRaw(options)

  60. def createGunzip(options: CompressionOptions = js.native): Gunzip

    Returns a new Gunzip object with an options.

    Returns a new Gunzip object with an options.

    Example:
    1. zlib.createGunzip(options)

  61. def createGzip(options: CompressionOptions = js.native): Gzip

    Returns a new Gzip object with an options.

    Returns a new Gzip object with an options.

    Example:
    1. zlib.createGzip(options)

  62. def createInflate(options: CompressionOptions = js.native): Inflate

    Returns a new Inflate object with an options.

    Returns a new Inflate object with an options.

    Example:
    1. zlib.createInflate(options)

  63. def createInflateRaw(options: CompressionOptions = js.native): InflateRaw

    Returns a new InflateRaw object with an options.

    Returns a new InflateRaw object with an options.

    Example:
    1. zlib.createInflateRaw(options)

  64. def createUnzip(options: CompressionOptions = js.native): Unzip

    Returns a new Unzip object with an options.

    Returns a new Unzip object with an options.

    Example:
    1. zlib.createUnzip(options)

  65. def deflate(buffer: Data, callback: Function): Unit
  66. def deflate(buffer: Data, options: CompressionOptions, callback: Function): Unit

    Compress a Buffer or string with Deflate.

    Compress a Buffer or string with Deflate.

    Example:
    1. zlib.deflate(buf[, options], callback)

  67. def deflateRaw(buffer: Data, callback: Function): Unit
  68. def deflateRaw(buffer: Data, options: CompressionOptions, callback: Function): Unit

    Compress a Buffer or string with DeflateRaw.

    Compress a Buffer or string with DeflateRaw.

    Example:
    1. zlib.deflateRaw(buf[, options], callback)

  69. def deflateRawSync(buffer: Data, options: CompressionOptions = js.native): Unit
  70. def deflateSync(buffer: Data, options: CompressionOptions = js.native): Unit

    Compress a Buffer or string with Deflate.

    Compress a Buffer or string with Deflate.

    Example:
    1. zlib.deflateSync(buf[, options])

  71. val domain: String
    Definition Classes
    IEventEmitter
  72. def emit(name: String, args: Any*): Boolean

    Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    name

    the event name

    args

    the event arguments

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.emit(name[, arg1][, arg2][, ...])

  73. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  74. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  75. def eventNames(): Array[String]
    Definition Classes
    IEventEmitter
  76. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  77. def getMaxListeners(): Int

    Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to EventEmitter.defaultMaxListeners.

    Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to EventEmitter.defaultMaxListeners.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.getMaxListeners()

    See also

    setMaxListeners()

  78. def gunzip(buffer: Data, callback: Function): Unit
  79. def gunzip(buffer: Data, options: CompressionOptions, callback: Function): Unit

    Decompress a Buffer or string with Gunzip.

    Decompress a Buffer or string with Gunzip.

    Example:
    1. zlib.gunzip(buf[, options], callback)

  80. def gunzipSync(buffer: Data, options: CompressionOptions = js.native): Unit

    Decompress a Buffer or string with Gunzip.

    Decompress a Buffer or string with Gunzip.

    Example:
    1. zlib.gunzipSync(buf[, options])

  81. def gzip(buffer: Data, callback: Function): Unit
  82. def gzip(buffer: Data, options: CompressionOptions, callback: Function): Unit

    Compress a Buffer or string with Gzip.

    Compress a Buffer or string with Gzip.

    Example:
    1. zlib.gzip(buf[, options], callback)

  83. def gzipSync(buffer: Data, options: CompressionOptions = js.native): Unit

    Compress a Buffer or string with Gzip.

    Compress a Buffer or string with Gzip.

    Example:
    1. zlib.gzipSync(buf[, options])

  84. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  85. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  86. def inflate(buffer: Data, callback: Function): Unit
  87. def inflate(buffer: Data, options: CompressionOptions, callback: Function): Unit

    Decompress a Buffer or string with Inflate.

    Decompress a Buffer or string with Inflate.

    Example:
    1. zlib.inflate(buf[, options], callback)

  88. def inflateRaw(buffer: Data, callback: Function): Unit
  89. def inflateRaw(buffer: Data, options: CompressionOptions, callback: Function): Unit

    Decompress a Buffer or string with InflateRaw.

    Decompress a Buffer or string with InflateRaw.

    Example:
    1. zlib.inflateRaw(buf[, options], callback)

  90. def inflateRawSync(buffer: Data, options: CompressionOptions = js.native): Unit

    Decompress a Buffer or string with InflateRaw.

    Decompress a Buffer or string with InflateRaw.

    Example:
    1. zlib.inflateRawSync(buf[, options])

  91. def inflateSync(buffer: Data, options: CompressionOptions = js.native): Unit

    Decompress a Buffer or string with Inflate.

    Decompress a Buffer or string with Inflate.

    Example:
    1. zlib.inflateSync(buf[, options])

  92. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  93. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  94. def listenerCount(eventName: String): Int

    Returns the number of listeners listening to the event named eventName.

    Returns the number of listeners listening to the event named eventName.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.listenerCount(eventName)

  95. def listeners(eventName: String): Array[Function]

    Returns a copy of the array of listeners for the event named eventName.

    Returns a copy of the array of listeners for the event named eventName.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.listeners(eventName)

  96. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  97. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  98. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  99. def on(eventName: String, listener: Function): Zlib.this.type

    Adds the listener function to the end of the listeners array for the event named eventName.

    Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    Returns a reference to the EventEmitter so calls can be chained.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.on(eventName, listener)

  100. def once(eventName: String, listener: Function): Zlib.this.type

    Adds a one time listener function for the event named eventName.

    Adds a one time listener function for the event named eventName. This listener is invoked only the next time eventName is triggered, after which it is removed.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.once(eventName, listener)

  101. def prependListener(eventName: String, listener: Function): Zlib.this.type
    Definition Classes
    IEventEmitter
  102. def prependOnceListener(eventName: String, listener: Function): Zlib.this.type
    Definition Classes
    IEventEmitter
  103. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  104. def removeAllListeners(eventName: String = js.native): Zlib.this.type

    Removes all listeners, or those of the specified eventName.

    Removes all listeners, or those of the specified eventName.

    Note that it is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

    Returns a reference to the EventEmitter so calls can be chained.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.removeAllListeners([eventName])

  105. def removeListener(eventName: String, listener: Function): Zlib.this.type

    Removes the specified listener from the listener array for the event named eventName.

    Removes the specified listener from the listener array for the event named eventName. removeListener will remove, at most, one instance of a listener from the listener array. If any single listener has been added multiple times to the listener array for the specified eventName, then removeListener must be called multiple times to remove each instance.

    Note that once an event has been emitted, all listeners attached to it at the time of emitting will be called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution will not remove them from emit() in progress. Subsequent events will behave as expected.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.removeListener(eventName, listener)

  106. def setMaxListeners(n: Int): Zlib.this.type

    By default EventEmitters will print a warning if more than 10 listeners are added for a particular event.

    By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. Obviously, not all events should be limited to just 10 listeners. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) for to indicate an unlimited number of listeners.

    Returns a reference to the EventEmitter so calls can be chained.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.setMaxListeners(n)

  107. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  108. def toLocaleString(): String
    Definition Classes
    Object
  109. def toString(): String
    Definition Classes
    AnyRef → Any
  110. def unzip(buffer: Data, callback: Function): Unit
  111. def unzip(buffer: Data, options: CompressionOptions, callback: Function): Unit

    Decompress a Buffer or string with Unzip.

    Decompress a Buffer or string with Unzip.

    Example:
    1. zlib.unzip(buf[, options], callback)

  112. def unzipSync(buffer: Data, options: CompressionOptions = js.native): Unit

    Decompress a Buffer or string with Unzip.

    Decompress a Buffer or string with Unzip.

    Example:
    1. zlib.unzipSync(buf[, options])

  113. val usingDomains: Boolean
    Definition Classes
    IEventEmitter
  114. def valueOf(): Any
    Definition Classes
    Object
  115. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  116. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  117. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from ZlibConstants

Inherited from UncategorizedConstants

Inherited from IEventEmitter

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped