code: func newDataEncoder(t dataEncoderType) *dataEncoder {
  	d := &dataEncoder{}
  
  	switch t {
  	case dataEncoderType1To9:
  		d = &dataEncoder{
  			minVersion:                   1,
  			maxVersion:                   9,
  			numericModeIndicator:         bitset.New(b0, b0, b0, b1),
  			alphanumericModeIndicator:    bitset.New(b0, b0, b1, b0),
  			byteModeIndicator:            bitset.New(b0, b1, b0, b0),
  			numNumericCharCountBits:      10,
  			numAlphanumericCharCountBits: 9,
  			numByteCharCountBits:         8,
  		}
  	case dataEncoderType10To26:
  		d = &dataEncoder{
  			minVersion:                   10,
  			maxVersion:                   26,
  			numericModeIndicator:         bitset.New(b0, b0, b0, b1),
  			alphanumericModeIndicator:    bitset.New(b0, b0, b1, b0),
  			byteModeIndicator:            bitset.New(b0, b1, b0, b0),
  			numNumericCharCountBits:      12,
  			numAlphanumericCharCountBits: 11,
  			numByteCharCountBits:         16,
  		}
  	case dataEncoderType27To40:
  		d = &dataEncoder{
  			minVersion:                   27,
  			maxVersion:                   40,
  			numericModeIndicator:         bitset.New(b0, b0, b0, b1),
  			alphanumericModeIndicator:    bitset.New(b0, b0, b1, b0),
  			byteModeIndicator:            bitset.New(b0, b1, b0, b0),
  			numNumericCharCountBits:      14,
  			numAlphanumericCharCountBits: 13,
  			numByteCharCountBits:         16,
  		}
  	default:
  		log.Panic("Unknown dataEncoderType")
  	}
  
  	return d
  }
docs: // newDataEncoder constructs a dataEncoder.