Module

Node.Zlib.Z

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

For a better understanding of Zlib, see these links:

#flush Source

flush :: forall zlibType. ZlibStream (Zlib zlibType) -> Effect Unit -> Effect Unit

#flush' Source

flush' :: forall zlibType. ZlibStream (Zlib zlibType) -> FlushStrategy -> Effect Unit -> Effect Unit

#params Source

params :: forall zlibType. UsesDeflate zlibType => ZlibStream (Zlib zlibType) -> CompressionLevel -> CompressionStrategy -> Effect Unit -> Effect Unit

#reset Source

reset :: forall zlibType. ZlibStream (Zlib zlibType) -> Effect Unit

#DeflateOptions Source

type DeflateOptions :: Row Typetype DeflateOptions = (chunkSize :: Int, dictionary :: Buffer, finishFlush :: FlushStrategy, flush :: FlushStrategy, level :: CompressionLevel, memLevel :: Int, strategy :: CompressionStrategy, windowBits :: WindowBitsSize)
  • flush <integer> Default: zlib.constants.Z_NO_FLUSH
  • finishFlush <integer> Default: zlib.constants.Z_FINISH
  • chunkSize <integer> Default: 16 * 1024
  • windowBits <integer>
  • level <integer> (compression only)
  • memLevel <integer> (compression only)
  • strategy <integer> (compression only)
  • dictionary <Buffer> | <TypedArray> | <DataView> | <ArrayBuffer> (deflate/inflate only, empty dictionary by default)

#GzipOptions Source

type GzipOptions :: Row Typetype GzipOptions = (chunkSize :: Int, finishFlush :: FlushStrategy, flush :: FlushStrategy, level :: CompressionLevel, memLevel :: Int, strategy :: CompressionStrategy, windowBits :: WindowBitsSize)
  • flush <integer> Default: zlib.constants.Z_NO_FLUSH
  • finishFlush <integer> Default: zlib.constants.Z_FINISH
  • chunkSize <integer> Default: 16 * 1024
  • windowBits <integer>
  • level <integer> (compression only)
  • memLevel <integer> (compression only)
  • strategy <integer> (compression only)

#InflateOptions Source

type InflateOptions :: Row Typetype InflateOptions = (chunkSize :: Int, dictionary :: Buffer, finishFlush :: FlushStrategy, flush :: FlushStrategy, windowBits :: WindowBitsSize)
  • flush <integer> Default: zlib.constants.Z_NO_FLUSH
  • finishFlush <integer> Default: zlib.constants.Z_FINISH
  • chunkSize <integer> Default: 16 * 1024
  • windowBits <integer>
  • dictionary <Buffer> | <TypedArray> | <DataView> | <ArrayBuffer> (deflate/inflate only, empty dictionary by default)

#GunzipOptions Source

type GunzipOptions :: Row Typetype GunzipOptions = (chunkSize :: Int, finishFlush :: FlushStrategy, flush :: FlushStrategy, windowBits :: WindowBitsSize)
  • flush <integer> Default: zlib.constants.Z_NO_FLUSH
  • finishFlush <integer> Default: zlib.constants.Z_FINISH
  • chunkSize <integer> Default: 16 * 1024
  • windowBits <integer>

#FlushStrategy Source

#WindowBitsSize Source

newtype WindowBitsSize

the base two logarithm of the window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage.

Instances

#mkWindowBitsSize Source

mkWindowBitsSize :: forall i. Reflectable i Int => Compare i 8 GT => Compare i 16 LT => Proxy i -> WindowBitsSize

#defaultCompression Source

#noCompression Source

#bestSpeed Source

#bestCompression Source

#mkCompressionLevel Source

mkCompressionLevel :: forall i. Reflectable i Int => Compare i (-1) GT => Compare i (10) LT => Proxy i -> CompressionLevel

A value of 0 indicates no compression. A value of 1 indicates fastest speed with least beneficial compression. A value between 1 and 9 makes a tradeoff between speed and compression quality. A value of 9 indicates slowest speed with most beneficial compression.