Module

Node.Zlib.Brotli

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

#BrotliOptions Source

type BrotliOptions :: BrotliType -> Row Typetype BrotliOptions brotliType = (chunkSize :: Int, finishFlush :: FlushStrategy, flush :: FlushStrategy, params :: Params brotliType)
  • flush <integer> Default: BROTLI_OPERATION_PROCESS
  • finishFlush <integer> Default: BROTLI_OPERATION_FINISH
  • chunkSize <integer> Default: 16 * 1024
  • params <Object> Key-value object containing indexed Brotli parameters.

The brotliType type variable indicates whether the params are built for the compression or decompression stream. To build a params value, see mkParams.

#Params Source

data Params :: BrotliType -> Typedata Params t0

#MutableParams Source

#mkParams Source

mkParams :: forall brotliType. (MutableParams brotliType -> MutableParams brotliType) -> Params brotliType

To build a Params value for a compression stream, use functions starting with compress. To build a Params value for a decompression stream, use functions starting with decompress.

-- compression
mkParams
 (compressMode modeGeneric
   >>> compressQuality (mkQuality (Proxy :: Proxy 10))
   >>> ...
   >>> compressSizeHint 4)

-- decompression
mkParams
 (decompressLargeWindow true
   >>> decompressDisableRingBufferReallocation true)

#ParamMode Source

#mkQuality Source

mkQuality :: forall i. Reflectable i Int => Compare i (-1) GT => Compare i (12) LT => Proxy i -> ParamQuality

#WindowBitsSize Source

#mkWindowBitsSize Source

mkWindowBitsSize :: forall i. Reflectable i Int => Compare i 9 GT => Compare i 31 LT => Proxy i -> WindowBitsSize i

#largeMaxWindowBits Source

#BlockBitsSize Source

#minInputBlockBits Source

#maxInputBlockBits Source

#mkBlockBitsSize Source

mkBlockBitsSize :: forall i. Reflectable i Int => Compare i 15 GT => Compare i 25 LT => Proxy i -> BlockBitsSize i

#compressNPostfixSizeWithNDirect Source

compressNPostfixSizeWithNDirect :: forall nPostfix nDirect. Reflectable nPostfix Int => Reflectable nDirect Int => Compare nPostfix (-1) GT => Compare nPostfix 4 LT => IsValidNDirectFor nPostfix nDirect => Proxy nPostfix -> Proxy nDirect -> MutableParams BrotliCompress -> MutableParams BrotliCompress

Adds the NpostfixSize and Ndirect parameters since the latter depends on the former.

#IsValidNDirectFor Source

class IsValidNDirectFor :: Int -> Int -> Constraintclass IsValidNDirectFor nPostfix nDirect | nPostfix -> nDirect
  • When 'Npostfix' is 0, then possible values are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
  • When 'Npostfix' is 1, then possible values are: 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30
  • When 'Npostfix' is 2, then possible values are: 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60
  • When 'Npostfix' is 3, then possible values are: 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120

Instances