CodecPipeline constructor

CodecPipeline(
  1. List<TextCodec> codecs
)

Creates a new codec pipeline with the given codecs.

codecs List of codecs to chain together. Must not be empty. The order matters: encoding applies codecs in order, decoding in reverse.

Implementation

CodecPipeline(this.codecs) {
  if (codecs.isEmpty) {
    throw ArgumentError('Codec pipeline must contain at least one codec');
  }
}