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.gz 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.

Source Distribution

gzinfo-1.0.3.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gzinfo-1.0.3-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file gzinfo-1.0.3.tar.gz.

File metadata

  • Download URL: gzinfo-1.0.3.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gzinfo-1.0.3.tar.gz
Algorithm Hash digest
SHA256 8705bd7cbef7123419649276c44f1085118ca82b62856313f2407cb003d578e7
MD5 761842e6e58032b0ee08d4aebe7550b2
BLAKE2b-256 59a34dd577904112cdb7141ba71e092c6dac60e82402d90259965717d60c0d44

See more details on using hashes here.

File details

Details for the file gzinfo-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: gzinfo-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gzinfo-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b0e603daff8b2172910e79d53bbefc460b173785a295cd364b7c396beffa964e
MD5 9740ab72b76f7fdf8709398c7db494a8
BLAKE2b-256 ec59e07a1b35a7f6f4a749b884965b6c2e1dd9648742442bad790342b694ee6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page