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) -> FlushStrategy -> Effect Unit -> Effect Unit
#params Source
params :: forall zlibType. UsesDeflate zlibType => ZlibStream (Zlib zlibType) -> CompressionLevel -> CompressionStrategy -> Effect Unit -> Effect Unit
#DeflateOptions Source
type DeflateOptions :: Row Type
type DeflateOptions = (chunkSize :: Int, dictionary :: Buffer, finishFlush :: FlushStrategy, flush :: FlushStrategy, level :: CompressionLevel, memLevel :: Int, strategy :: CompressionStrategy, windowBits :: WindowBitsSize)
flush
<integer> Default: zlib.constants.Z_NO_FLUSHfinishFlush
<integer> Default: zlib.constants.Z_FINISHchunkSize
<integer> Default: 16 * 1024windowBits
<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 Type
type GzipOptions = (chunkSize :: Int, finishFlush :: FlushStrategy, flush :: FlushStrategy, level :: CompressionLevel, memLevel :: Int, strategy :: CompressionStrategy, windowBits :: WindowBitsSize)
flush
<integer> Default: zlib.constants.Z_NO_FLUSHfinishFlush
<integer> Default: zlib.constants.Z_FINISHchunkSize
<integer> Default: 16 * 1024windowBits
<integer>level
<integer> (compression only)memLevel
<integer> (compression only)strategy
<integer> (compression only)
#InflateOptions Source
type InflateOptions :: Row Type
type InflateOptions = (chunkSize :: Int, dictionary :: Buffer, finishFlush :: FlushStrategy, flush :: FlushStrategy, windowBits :: WindowBitsSize)
flush
<integer> Default: zlib.constants.Z_NO_FLUSHfinishFlush
<integer> Default: zlib.constants.Z_FINISHchunkSize
<integer> Default: 16 * 1024windowBits
<integer>dictionary
<Buffer> | <TypedArray> | <DataView> | <ArrayBuffer> (deflate/inflate only, empty dictionary by default)
#GunzipOptions Source
type GunzipOptions :: Row Type
type GunzipOptions = (chunkSize :: Int, finishFlush :: FlushStrategy, flush :: FlushStrategy, windowBits :: WindowBitsSize)
flush
<integer> Default: zlib.constants.Z_NO_FLUSHfinishFlush
<integer> Default: zlib.constants.Z_FINISHchunkSize
<integer> Default: 16 * 1024windowBits
<integer>
#FlushStrategy Source
newtype FlushStrategy
#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
defaultCompression :: CompressionLevel
Same as -1
#noCompression Source
noCompression :: CompressionLevel
Same as 0
#bestSpeed Source
bestSpeed :: CompressionLevel
Same as 1
#bestCompression Source
bestCompression :: CompressionLevel
Same as 9
#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.