encode method

List<int> encode(
  1. MetadataV2p3Body data
)

Implementation

List<int> encode(MetadataV2p3Body data) {
  int start = 0;
  final idBytes = _output.sublist(start, start + 3);
  if (isoCodec.decode(idBytes) == 'ID3') {
    start += 3;
    _deepDecode(start, data);
  } else {
    final insetBytes = _createNewID3Body(data);
    _output.insertAll(0, insetBytes);
  }
  return _output;
}