writeToStreamCompressed static method
- CompoundTag tag, [
 - void onWriteListener()?
 
Writes the NBT Data to stream in compressed mode
Implementation
static Future<Uint8List> writeToStreamCompressed(CompoundTag tag,
    [void Function(int)? onWriteListener]) async {
  _io.disposeStream();
  _io = ByteLayer();
  _io.addListener(onWriteListener);
  Tag.writeNamedTag(tag, _io);
  _io.compress();
  return _io.bytes;
}