@classmethod<EOL><INDENT>def from_buffer(cls, buff, byteorder='<STR_LIT>'):<DEDENT>
self = cls.parse(buff, byteorder)<EOL>self.filename = getattr(buff, '<STR_LIT:name>', self.filename)<EOL>self.gzipped = isinstance(buff, gzip.GzipFile)<EOL>self.byteorder = byteorder<EOL>return self<EOL>
Load nbt file from a file-like object.

        The `buff` argument can be either a standard `io.BufferedReader`
        for uncompressed nbt or a `gzip.GzipFile` for gzipped nbt data.