toOctal function

String toOctal(
  1. List<int> input, {
  2. Base8Codec codec = Base8Codec.standard,
})

Converts 8-bit integer sequence to 3-bit Base-8 character sequence.

Parameters:

NOTE:, This implementation is a bit-wise encoding of the input bytes. To get the numeric representation of the input in binary:

toBigInt(input).toRadixString(8)

Implementation

String toOctal(
  List<int> input, {
  Base8Codec codec = Base8Codec.standard,
}) {
  var out = codec.encoder.convert(input);
  return String.fromCharCodes(out);
}