Skip to main content

Retrieving archive filename from gz files in Python

Project description

Gzip Information

Build Status

Getting the original filename form gzip archive in Python (compatible with Python 3.6, 3.7 and 3.8).

Install

from github directly:

pip install git+https://github.com/PierreSelim/gzinfo.git

Usage

If you gzip a file called foo.txt and rename the archive bar.txt you can still retrive the original name from the header (per RFC1952)

>>> import gzinfo
>>> info = gzinfo.read_gz_info('bar.txt.gz')
>>> info.fname
'foo.txt'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gzinfo, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size gzinfo-1.0.2.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page