toBinaryBytes function

Uint8List toBinaryBytes(
  1. List<int> input, {
  2. Base2Codec codec = Base2Codec.standard,
})

Converts 8-bit integer sequence to Base-2 and returns the ASCII bytes.

This is the same as toBinary but returns the encoded characters as a Uint8List of ASCII codes, skipping the intermediate String.

Parameters:

Implementation

Uint8List toBinaryBytes(
  List<int> input, {
  Base2Codec codec = Base2Codec.standard,
}) {
  return codec.encoder.convert(input);
}