BrotliEncoder constructor

BrotliEncoder({
  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. int inputBufferLength = CodecBufferHolder.autoLength,
  11. int outputBufferLength = CodecBufferHolder.autoLength,
})

Construct an BrotliEncoder with the supplied parameters used by the Brotli encoder.

Validation will be performed which may result in a RangeError or ArgumentError.

Implementation

BrotliEncoder(
    {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.inputBufferLength = CodecBufferHolder.autoLength,
    this.outputBufferLength = CodecBufferHolder.autoLength}) {
  validateBrotliLevel(level);
  validateBrotliWindowBits(windowBits);
  validateBrotliBlockBits(blockBits);
  validateBrotliPostfixBits(postfixBits);
}