append8BitBytes static method

void append8BitBytes(
  1. String content,
  2. BitArray bits,
  3. Encoding encoding
)

Implementation

static void append8BitBytes(
    String content, BitArray bits, Encoding encoding) {
  var bytes = encoding.encode(content);
  for (var b in bytes) {
    bits.appendBits(b, 8);
  }
}