'readlines(fileobj, encoding) -> list of lines'

@staticmethod
def readlines(fileobj, encoding):

    gz = gzip.GzipFile(fileobj=fileobj, mode='rb')
    try:
        data = gz.read(IMPORT_PEEK_SIZE)
    except IOError:
        return None
    try:
        return unicode(data, encoding, errors='replace').splitlines()[:IMPORT_PEEK_NLINES]
    except UnicodeError:
        return None
