Simple context manager for wrapping file compression and uncompression operations.
Project description
Compander
=========
Simple context manager to wrap compression and uncompression of gzip and bzip2 files.
Example
-------
```
from compander import Compander
with Compander() as c: # Default is bz2
c.compress('uncompressed_file','compressed_file.bz2')
with Compander('bz2') as c:
c.uncompress('compressed_file.bz2','uncompressed_file')
with Compander('gz') as c:
c.compress('uncompressed_file','compressed_file.gz')
with Compander('gz') as c:
c.uncompress('compressed_file.gz','uncompressed_file')
```
Testing
-------
* python setup.py test
Installation
------------
* python setup.py install
Development
-----------
* pip install -r requirements.txt
* python setup.py test
* python setup.py develop
=========
Simple context manager to wrap compression and uncompression of gzip and bzip2 files.
Example
-------
```
from compander import Compander
with Compander() as c: # Default is bz2
c.compress('uncompressed_file','compressed_file.bz2')
with Compander('bz2') as c:
c.uncompress('compressed_file.bz2','uncompressed_file')
with Compander('gz') as c:
c.compress('uncompressed_file','compressed_file.gz')
with Compander('gz') as c:
c.uncompress('compressed_file.gz','uncompressed_file')
```
Testing
-------
* python setup.py test
Installation
------------
* python setup.py install
Development
-----------
* pip install -r requirements.txt
* python setup.py test
* python setup.py develop
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
compander-0.1.tar.gz
(3.4 kB
view details)
File details
Details for the file compander-0.1.tar.gz
.
File metadata
- Download URL: compander-0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b6c0e23d9d46802f9d878e96e2bf5c6aa2ebb5624b8429492e7c5f9275115e0 |
|
MD5 | f75d42115ab7b2c54177ca3509fab2f8 |
|
BLAKE2b-256 | ed732c63461a3821b598d7a670564c69db6322a8de33936b73f029762890d6ce |