Module
Node.Zlib.Brotli
- Package
- purescript-node-zlib
- Repository
- purescript-node/purescript-node-zlib
#BrotliOptions Source
type BrotliOptions :: BrotliType -> Row Type
type 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 -> Type
data MutableParams t0
#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)
#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 -> Type
newtype 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 -> Type
newtype 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 BrotliCompress
Adds the NpostfixSize
and Ndirect
parameters since the latter depends
on the former.
#IsValidNDirectFor Source
class IsValidNDirectFor :: Int -> Int -> Constraint
class 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 0
IsValidNDirectFor 0 1
IsValidNDirectFor 0 2
IsValidNDirectFor 0 3
IsValidNDirectFor 0 4
IsValidNDirectFor 0 5
IsValidNDirectFor 0 6
IsValidNDirectFor 0 7
IsValidNDirectFor 0 8
IsValidNDirectFor 0 9
IsValidNDirectFor 0 10
IsValidNDirectFor 0 11
IsValidNDirectFor 0 12
IsValidNDirectFor 0 13
IsValidNDirectFor 0 14
IsValidNDirectFor 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 i
IsValidNDirectFor 1 0
IsValidNDirectFor 1 2
IsValidNDirectFor 1 4
IsValidNDirectFor 1 6
IsValidNDirectFor 1 8
IsValidNDirectFor 1 10
IsValidNDirectFor 1 12
IsValidNDirectFor 1 14
IsValidNDirectFor 1 16
IsValidNDirectFor 1 18
IsValidNDirectFor 1 20
IsValidNDirectFor 1 22
IsValidNDirectFor 1 24
IsValidNDirectFor 1 26
IsValidNDirectFor 1 28
IsValidNDirectFor 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 i
IsValidNDirectFor 2 0
IsValidNDirectFor 2 4
IsValidNDirectFor 2 8
IsValidNDirectFor 2 12
IsValidNDirectFor 2 16
IsValidNDirectFor 2 20
IsValidNDirectFor 2 24
IsValidNDirectFor 2 28
IsValidNDirectFor 2 32
IsValidNDirectFor 2 36
IsValidNDirectFor 2 40
IsValidNDirectFor 2 44
IsValidNDirectFor 2 48
IsValidNDirectFor 2 52
IsValidNDirectFor 2 56
IsValidNDirectFor 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 i
IsValidNDirectFor 3 0
IsValidNDirectFor 3 8
IsValidNDirectFor 3 16
IsValidNDirectFor 3 24
IsValidNDirectFor 3 32
IsValidNDirectFor 3 40
IsValidNDirectFor 3 48
IsValidNDirectFor 3 56
IsValidNDirectFor 3 64
IsValidNDirectFor 3 72
IsValidNDirectFor 3 80
IsValidNDirectFor 3 88
IsValidNDirectFor 3 96
IsValidNDirectFor 3 104
IsValidNDirectFor 3 112
IsValidNDirectFor 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