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:
- Deflate, DeflateRaw, and Gzip: https://stackoverflow.com/a/68538037
- Gzip vs Brotli: https://www.siteground.com/blog/brotli-vs-gzip-compression/
#ZlibStream Source
data ZlibStream :: Compression -> Type
data 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.
#Brotli Source
data Brotli :: BrotliType -> Compression
data Brotli t0
#DeflateRaw Source
data DeflateRaw :: ZlibType
data 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
#Gzip Source
#InflateRaw Source
data InflateRaw :: ZlibType
data InflateRaw
Uses "inflate" algorithm to decompress data that was compressed via DeflateRaw
stream.
#BrotliType Source
data BrotliType
Indicates whether the Brotli stream is compressing/decompressing the data
#BrotliCompress Source
data BrotliCompress :: BrotliType
data BrotliCompress
#BrotliDecompress Source
data BrotliDecompress :: BrotliType
data BrotliDecompress
#UsesDeflate Source
class UsesDeflate :: ZlibType -> Constraint
class UsesDeflate a
Indicates whether the ZlibType
uses the "deflate" algorithm.