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