InputEdge constructor

InputEdge(
  1. int c,
  2. ECIEncoderSet encoderSet,
  3. int encoderIndex,
  4. InputEdge? previous,
  5. int fnc1,
)

Implementation

InputEdge(
  int c,
  ECIEncoderSet encoderSet,
  this.encoderIndex,
  this.previous,
  int fnc1,
) : c = c == fnc1 ? 1000 : c {
  int size = this.c == 1000 ? 1 : encoderSet.encode(c, encoderIndex).length;
  final previousEncoderIndex = previous?.encoderIndex ?? 0;
  if (previousEncoderIndex != encoderIndex) {
    size += MinimalECIInput.costPerECI;
  }
  size += previous?.cachedTotalSize ?? 0;

  cachedTotalSize = size;
}