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_PROCESSfinishFlush<integer> Default: BROTLI_OPERATION_FINISHchunkSize<integer> Default: 16 * 1024params<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.
#MutableParams Source
data MutableParams :: BrotliType -> Typedata MutableParams t0
#mkParams Source
mkParams :: forall brotliType. (MutableParams brotliType -> MutableParams brotliType) -> Params brotliTypeTo 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)
#mkQuality Source
mkQuality :: forall i. Reflectable i Int => Compare i (-1) GT => Compare i (12) LT => Proxy i -> ParamQuality#compressLgWin Source
compressLgWin :: forall i. Reflectable i Int => Compare i 9 GT => Compare i 25 LT => WindowBitsSize i -> MutableParams BrotliCompress -> MutableParams BrotliCompress#WindowBitsSize Source
newtype WindowBitsSize :: Int -> Typenewtype WindowBitsSize i
Instances
Eq (WindowBitsSize i)Ord (WindowBitsSize i)Show (WindowBitsSize i)
#minWindowBits Source
minWindowBits :: WindowBitsSize 10#maxWindowBits Source
maxWindowBits :: WindowBitsSize 24#defaultWindow Source
defaultWindow :: WindowBitsSize 22#mkWindowBitsSize Source
mkWindowBitsSize :: forall i. Reflectable i Int => Compare i 9 GT => Compare i 31 LT => Proxy i -> WindowBitsSize i#compressLargeWindow Source
compressLargeWindow :: forall i. Reflectable i Int => Compare i 9 GT => Compare i 31 LT => WindowBitsSize i -> MutableParams BrotliCompress -> MutableParams BrotliCompress#compressLgBlock Source
compressLgBlock :: forall i. Reflectable i Int => Compare i 15 GT => Compare i 25 LT => BlockBitsSize i -> MutableParams BrotliCompress -> MutableParams BrotliCompress#BlockBitsSize Source
newtype BlockBitsSize :: Int -> Typenewtype BlockBitsSize i
Instances
Eq (BlockBitsSize i)Ord (BlockBitsSize i)Show (BlockBitsSize i)
#mkBlockBitsSize Source
mkBlockBitsSize :: forall i. Reflectable i Int => Compare i 15 GT => Compare i 25 LT => Proxy i -> BlockBitsSize i#compressNPostfixSize Source
compressNPostfixSize :: forall i. Reflectable i Int => Compare i (-1) GT => Compare i 4 LT => Proxy i -> MutableParams BrotliCompress -> MutableParams BrotliCompress#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 BrotliCompressAdds 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
IsValidNDirectFor 0 0IsValidNDirectFor 0 1IsValidNDirectFor 0 2IsValidNDirectFor 0 3IsValidNDirectFor 0 4IsValidNDirectFor 0 5IsValidNDirectFor 0 6IsValidNDirectFor 0 7IsValidNDirectFor 0 8IsValidNDirectFor 0 9IsValidNDirectFor 0 10IsValidNDirectFor 0 11IsValidNDirectFor 0 12IsValidNDirectFor 0 13IsValidNDirectFor 0 14IsValidNDirectFor 0 15(Fail (Text "number must be one of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15")) => IsValidNDirectFor 0 iIsValidNDirectFor 1 0IsValidNDirectFor 1 2IsValidNDirectFor 1 4IsValidNDirectFor 1 6IsValidNDirectFor 1 8IsValidNDirectFor 1 10IsValidNDirectFor 1 12IsValidNDirectFor 1 14IsValidNDirectFor 1 16IsValidNDirectFor 1 18IsValidNDirectFor 1 20IsValidNDirectFor 1 22IsValidNDirectFor 1 24IsValidNDirectFor 1 26IsValidNDirectFor 1 28IsValidNDirectFor 1 30(Fail (Text "number must be one of 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30")) => IsValidNDirectFor 1 iIsValidNDirectFor 2 0IsValidNDirectFor 2 4IsValidNDirectFor 2 8IsValidNDirectFor 2 12IsValidNDirectFor 2 16IsValidNDirectFor 2 20IsValidNDirectFor 2 24IsValidNDirectFor 2 28IsValidNDirectFor 2 32IsValidNDirectFor 2 36IsValidNDirectFor 2 40IsValidNDirectFor 2 44IsValidNDirectFor 2 48IsValidNDirectFor 2 52IsValidNDirectFor 2 56IsValidNDirectFor 2 60(Fail (Text "number must be one of 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60")) => IsValidNDirectFor 2 iIsValidNDirectFor 3 0IsValidNDirectFor 3 8IsValidNDirectFor 3 16IsValidNDirectFor 3 24IsValidNDirectFor 3 32IsValidNDirectFor 3 40IsValidNDirectFor 3 48IsValidNDirectFor 3 56IsValidNDirectFor 3 64IsValidNDirectFor 3 72IsValidNDirectFor 3 80IsValidNDirectFor 3 88IsValidNDirectFor 3 96IsValidNDirectFor 3 104IsValidNDirectFor 3 112IsValidNDirectFor 3 120(Fail (Text "number must be one of 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120")) => IsValidNDirectFor 3 i