MinimalEncoder constructor

MinimalEncoder(
  1. String stringToEncode,
  2. Encoding? priorityCharset,
  3. bool isGS1,
  4. ErrorCorrectionLevel ecLevel,
)

Creates a MinimalEncoder

@param stringToEncode The string to encode @param priorityCharset The preferred {@link Charset}. When the value of the argument is null, the algorithm chooses charsets that leads to a minimal representation. Otherwise the algorithm will use the priority charset to encode any character in the input that can be encoded by it if the charset is among the supported charsets. @param isGS1 {@code true} if a FNC1 is to be prepended; {@code false} otherwise @param ecLevel The error correction level. @see ResultList#getVersion

Implementation

MinimalEncoder(
  this.stringToEncode,
  Encoding? priorityCharset,
  this.isGS1,
  this.ecLevel,
) : encoders = ECIEncoderSet(stringToEncode, priorityCharset, -1);