BrotliCodec constructor

BrotliCodec({
  1. int level = BrotliOption.defaultLevel,
  2. int mode = BrotliOption.defaultMode,
  3. int windowBits = BrotliOption.defaultWindowBits,
  4. int? blockBits,
  5. int? postfixBits,
  6. bool literalContextModeling = true,
  7. int sizeHint = 0,
  8. bool largeWindow = false,
  9. int? directDistanceCodeCount,
  10. bool ringBufferReallocation = true,
  11. int inputBufferLength = CodecBufferHolder.autoLength,
  12. int outputBufferLength = CodecBufferHolder.autoLength,
})

Construct an BrotliCodec that is configured with the following parameters.

Default values are provided for unspecified parameters. Validation is performed which may result in throwing a RangeError or ArgumentError

Implementation

BrotliCodec(
    {this.level = BrotliOption.defaultLevel,
    this.mode = BrotliOption.defaultMode,
    this.windowBits = BrotliOption.defaultWindowBits,
    this.blockBits,
    this.postfixBits,
    this.literalContextModeling = true,
    this.sizeHint = 0,
    this.largeWindow = false,
    this.directDistanceCodeCount,
    this.ringBufferReallocation = true,
    this.inputBufferLength = CodecBufferHolder.autoLength,
    this.outputBufferLength = CodecBufferHolder.autoLength}) {
  validateBrotliLevel(level);
  validateBrotliWindowBits(windowBits);
  validateBrotliBlockBits(blockBits);
  validateBrotliPostfixBits(postfixBits);
}