gzip — Support for gzip files — Python 3.12.4 documentation

PHOTO EMBED

Sun Jul 28 2024 08:21:20 GMT+0000 (Coordinated Universal Time)

Saved by @Shook87

import gzip
with gzip.open('/home/joe/file.txt.gz', 'rb') as f:
    file_content = f.read()
content_copyCOPY

https://docs.python.org/3/library/gzip.html