write static method
- String file,
 - CompoundTag tag, [
 - void onWriteListener()?
 
Implementation
static Future<void> write(String file, CompoundTag tag,
    [void Function(int)? onWriteListener]) async {
  _io.disposeStream();
  _io = ByteLayer();
  _io.addListener(onWriteListener);
  Tag.writeNamedTag(tag, _io);
  await _io.writeToFile(file);
}