docs: def parse_file(self, filename=None, buffer=None, fileobj=None):
          """Completely parse a file, extracting all tags."""
          if filename:
              self.file = GzipFile(filename, 'rb')
          elif buffer:
              if hasattr(buffer, 'name'):
                  self.filename = buffer.name
              self.file = buffer
          elif fileobj:
              if hasattr(fileobj, 'name'):
                  self.filename = fileobj.name
              self.file = GzipFile(fileobj=fileobj)
          if self.file:
              try:
                  type = TAG_Byte(buffer=self.file)
                  if type.value == self.id:
                      name = TAG_String(buffer=self.file).value
                      self._parse_buffer(self.file)
                      self.name = name
                      self.file.close()
                  else:
                      raise MalformedFileError(
                          "First record is not a Compound Tag")
              except StructError as e:
                  raise MalformedFileError(
                      "Partial File Parse: file possibly truncated.")
          else:
              raise ValueError(
                  "NBTFile.parse_file(): Need to specify either a "
                  "filename or a file object"
              )