# Path: pymzml/file_classes/standardGzip.py
# class StandardGzip(object):
#     def __init__(self, path, encoding):
#     def close(self):
#     def _build_index(self):
#     def read(self, size=-1):
#     def __getitem__(self, identifier):
# 
# Path: pymzml/file_classes/standardMzml.py
# class StandardMzml(object):
#     def __init__(self, path, encoding, build_index_from_scratch=False, index_regex=None):
#     def get_binary_file_handler(self):
#     def get_file_handler(self, encoding):
#     def __getitem__(self, identifier):
#     def _binary_search(self, target_index):
#     def _build_index(self, from_scratch=False):
#     def _build_index_from_scratch(self, seeker):
#         def get_data_indices(fh, chunksize=8192, lookback_size=100):
#     def _interpol_search(self, target_index, chunk_size=8, fallback_cutoff=100):
#     def _read_to_spec_end(self, seeker, chunks_to_read=8):
#     def _read_extremes(self):
#     def _search_linear(self, seeker, index, chunk_size=8):
#     def _search_string_identifier(self, search_string, chunk_size=8):
#     def _read_until_tag_end(self, seeker, max_search_len=12, byte_mode=False):
#     def read(self, size=-1):
#     def close(self):


from io import BytesIO
from pymzml.file_classes import indexedGzip, standardGzip, standardMzml, bytesMzml
from pymzml.utils import GSGR
        self.file_handler = self._open(path)
        self.offset_dict = self.file_handler.offset_dict

    def close(self):
        """Close the internal file handler."""
        self.file_handler.close()

    def _open(self, path_or_file):
        """
        Open a file like object resp. a wrapper for a file like object.

        Arguments:
            path (str): path to the mzml file

        Returns:
            file_handler: instance of
            :py:class:`~pymzml.file_classes.standardGzip.StandardGzip`,
            :py:class:`~pymzml.file_classes.indexedGzip.IndexedGzip` or
            :py:class:`~pymzml.file_classes.standardMzml.StandardMzml`,
            based on the file ending of 'path'
        """
        if isinstance(path_or_file, BytesIO):
            return bytesMzml.BytesMzml(
                path_or_file, self.encoding, self.build_index_from_scratch
            )
        if path_or_file.endswith(".gz"):
            if self._indexed_gzip(path_or_file):
                return indexedGzip.IndexedGzip(path_or_file, self.encoding)
            else:
                return standardGzip.StandardGzip(path_or_file, self.encoding)

# Path: pymzml/file_classes/standardGzip.py
# class StandardGzip(object):
#     def __init__(self, path, encoding):
#     def close(self):
#     def _build_index(self):
#     def read(self, size=-1):
#     def __getitem__(self, identifier):
# 
# Path: pymzml/file_classes/standardMzml.py
# class StandardMzml(object):
#     def __init__(self, path, encoding, build_index_from_scratch=False, index_regex=None):
#     def get_binary_file_handler(self):
#     def get_file_handler(self, encoding):
#     def __getitem__(self, identifier):
#     def _binary_search(self, target_index):
#     def _build_index(self, from_scratch=False):
#     def _build_index_from_scratch(self, seeker):
#         def get_data_indices(fh, chunksize=8192, lookback_size=100):
#     def _interpol_search(self, target_index, chunk_size=8, fallback_cutoff=100):
#     def _read_to_spec_end(self, seeker, chunks_to_read=8):
#     def _read_extremes(self):
#     def _search_linear(self, seeker, index, chunk_size=8):
#     def _search_string_identifier(self, search_string, chunk_size=8):
#     def _read_until_tag_end(self, seeker, max_search_len=12, byte_mode=False):
#     def read(self, size=-1):
#     def close(self):


# Path: pymzml/file_interface.py
from io import BytesIO
from pymzml.file_classes import indexedGzip, standardGzip, standardMzml, bytesMzml
from pymzml.utils import GSGR

        self.file_handler = self._open(path)
        self.offset_dict = self.file_handler.offset_dict

    def close(self):
        """Close the internal file handler."""
        self.file_handler.close()

    def _open(self, path_or_file):
        """
        Open a file like object resp. a wrapper for a file like object.

        Arguments:
            path (str): path to the mzml file

        Returns:
            file_handler: instance of
            :py:class:`~pymzml.file_classes.standardGzip.StandardGzip`,
            :py:class:`~pymzml.file_classes.indexedGzip.IndexedGzip` or
            :py:class:`~pymzml.file_classes.standardMzml.StandardMzml`,
            based on the file ending of 'path'
        """
        if isinstance(path_or_file, BytesIO):
            return bytesMzml.BytesMzml(
                path_or_file, self.encoding, self.build_index_from_scratch
            )
        if path_or_file.endswith(".gz"):
            if self._indexed_gzip(path_or_file):
                return indexedGzip.IndexedGzip(path_or_file, self.encoding)
            else:
                return standardGzip.StandardGzip(path_or_file, self.encoding)

        return standardMzml.StandardMzml(