Multi Member GZip Support for Python 3
Project description
Multi GZip
This package is a port of the Python2 gzip implementation with the goal of providing multi-member gzip support. Currently Python3's gzip implementation supports reading multi-member gzip files as a single stream, but does not provide the ability to read or write one member at a time. This is useful for iterating over the members of a gzip file in e.g. WARC files.
Usage Example
from multigzip import GzipFile
with GzipFile(filename='tests.txt.gz', mode='wb') as f:
f.write_member(b'Hello world 1')
f.write_member(b'Hello world 2')
f.write_member(b'Hello world 3')
with GzipFile(filename='tests.txt.gz', mode='r') as f:
# Note that read() returns a file-like object
# this is unchanged vs the `gzip2` module ported
# from warc
print(f.read_member().read())
print(f.read_member().read())
print(f.read_member().read())
Supports Python3 Only
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multigzip-0.0.1.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for multigzip-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a18083e98599ba6f9e3f77c35099b93b5b0f4839bc395d8f2867f2f3982206b2 |
|
MD5 | 6e4373bc379882886ae6afe576598e7a |
|
BLAKE2b-256 | 511faca56f54edc8dc7642c07bb97b134acd9d143330747503cae81b40f6357d |