code: func (d *dataEncoder) encodeDataRaw(data []byte, dataMode dataMode, encoded *bitset.Bitset) {
  	modeIndicator := d.modeIndicator(dataMode)
  	charCountBits := d.charCountBits(dataMode)
  
  	// Append mode indicator.
  	encoded.Append(modeIndicator)
  
  	// Append character count.
  	encoded.AppendUint32(uint32(len(data)), charCountBits)
  
  	// Append data.
  	switch dataMode {
  	case dataModeNumeric:
  		for i := 0; i < len(data); i += 3 {
  			charsRemaining := len(data) - i
  
  			var value uint32
  			bitsUsed := 1
  
  			for j := 0; j < charsRemaining && j < 3; j++ {
  				value *= 10
  				value += uint32(data[i+j] - 0x30)
  				bitsUsed += 3
  			}
  			encoded.AppendUint32(value, bitsUsed)
  		}
  	case dataModeAlphanumeric:
  		for i := 0; i < len(data); i += 2 {
  			charsRemaining := len(data) - i
  
  			var value uint32
  			for j := 0; j < charsRemaining && j < 2; j++ {
  				value *= 45
  				value += encodeAlphanumericCharacter(data[i+j])
  			}
  
  			bitsUsed := 6
  			if charsRemaining > 1 {
  				bitsUsed = 11
  			}
  
  			encoded.AppendUint32(value, bitsUsed)
  		}
  	case dataModeByte:
  		for _, b := range data {
  			encoded.AppendByte(b, 8)
  		}
  	}
  }
docs: // encodeDataRaw encodes data in dataMode. The encoded data is appended to
  // encoded.