Module

Node.Zlib.Types

Package
purescript-node-zlib
Repository
purescript-node/purescript-node-zlib

For a better understanding of the types below, see these links:

#ZlibStream Source

data ZlibStream :: Compression -> Typedata ZlibStream t0

Transformer stream with a type-level value indicating which kind of compression is being used, either a Zlib type or a Brotli type. For example:

Zlibstream (Brotli BrotliCompress)
Zlibstream (Zlib Deflate)

Zlibstream extends Duplex and EventEmitter.

#Compression Source

data Compression

Indicates whether a Zlib algorithm (i.e. "deflate" or "inflate") or Brotli algorithm is being used for compression/decompression.

#Zlib Source

data Zlib :: ZlibType -> Compressiondata Zlib t0

#Brotli Source

#ZlibType Source

data ZlibType

Indicates which Zlib type is being used.

#DeflateRaw Source

data DeflateRaw :: ZlibTypedata DeflateRaw

Uses "deflate" algorithm to compress data with the following metadata:

  • header: 0 bytes
  • footer: 0 bytes
  • checksum: <none>

In other words, the raw deflate bit stream with no metadata.

Instances

#Deflate Source

data Deflate :: ZlibTypedata Deflate

Uses "deflate" algorithm to compress data with the following metadata:

  • header: 2 bytes
  • footer: 0 bytes
  • checksum: Adler-32

In other words, the raw deflate bit stream wrapped with some metadata.

Instances

#Gzip Source

data Gzip :: ZlibTypedata Gzip

Uses "deflate" algorithm to compress data with the following metadata:

  • header: 10 bytes
  • footer: 4 bytes
  • checksum: CRC32

In other words, the raw deflate bit stream wrapped with some metadata.

Instances

#InflateRaw Source

data InflateRaw :: ZlibTypedata InflateRaw

Uses "inflate" algorithm to decompress data that was compressed via DeflateRaw stream.

#Inflate Source

data Inflate :: ZlibTypedata Inflate

Uses "inflate" algorithm to decompress data that was compressed via Deflate stream.

#Gunzip Source

data Gunzip :: ZlibTypedata Gunzip

Uses "inflate" algorithm to decompress data that was compressed via Gzip stream.

#Unzip Source

data Unzip :: ZlibTypedata Unzip

Decompresses data from either a Gunzip or Inflate stream by auto-detecting the header.

#BrotliType Source

data BrotliType

Indicates whether the Brotli stream is compressing/decompressing the data

#UsesDeflate Source

class UsesDeflate :: ZlibType -> Constraintclass UsesDeflate a 

Indicates whether the ZlibType uses the "deflate" algorithm.

Instances