readSync static method

Tag readSync(
  1. String file, [
  2. void onReadListener(
    1. int
    )?
])

Implementation

static Tag readSync(String file, [void Function(int)? onReadListener]) {
  _io.disposeStream();
  _readSync(file, onReadListener);
  if (_io.readByte() == TagType.Compound.byte) {
    _io.resetPosition();
    return Tag.readNamedTag(_io);
  } else {
    // Is likely gzip compressed
    return readCompressedSync(file);
  }
}