encode method Null safety

List<int> encode (
  1. Archive archive
)

Implementation

List<int> encode(Archive archive) {
  final output_stream = OutputStream();
  start(output_stream);

  for (final file in archive.files) {
    add(file);
  }

  finish();

  return output_stream.getBytes();
}