read static method

Future<Tag> read(
  1. String file, [
  2. void onReadListener(
    1. int
    )?
])

Implementation

static Future<Tag> read(String file,
    [void Function(int)? onReadListener]) async {
  _io.disposeStream();
  await _read(file, onReadListener);
  if (_io.readByte() == TagType.Compound.byte) {
    _io.resetPosition();
    return Tag.readNamedTag(_io);
  } else {
    // Is likely gzip compressed
    return readCompressed(file);
  }
}