with gzip.GzipFile(fileobj=f, mode='rb') as gz:

                line = gz.readline().decode('utf-8').strip()

                while line != '':