Skip to main content

Library used to compress files using gzip but more simple

Project description

GZip Compression Utility

This is a Python package that provides a simple utility for compressing and decompressing files using the GZip format. The package uses the gzip module from the Python standard library.

Installation

You can install the package using pip:

pip install compressfiles

Usage

The package provides two main functions: compress() and decompress().

Compressing a txt file

To compress a file, use the compress() function. For example:

from compressfiles import compress

compress('my_file.txt')

This will compress my_file.txt and save the compressed file as my_file.gz.

You can also specify the output file path using the output_file_path parameter:

compress('my_file.txt','my_file.gz') You can customize the compression level (0-9), default is '6' compress('my_file.txt','my_file.gz', '8')

Decompressing a file

To decompress a file, use the decompress() function. For example:

from compressfiles import decompress

decompress('my_file.gz')

This will decompress my_file.gz and save the decompressed file as my_file.txt.

You can also specify the output file path using the output_file_path parameter:

decompress('my_file.gz', 'my_file.txt')

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.

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

compressfiles-0.0.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

compressfiles-0.0.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file compressfiles-0.0.3.tar.gz.

File metadata

  • Download URL: compressfiles-0.0.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for compressfiles-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ca0d7d50e6cfbefb4efb1d9509d3d91821db4ef47f7d15366fdf29daae4f489e
MD5 dc5a6a8e83c621a0b01aab33b18f024b
BLAKE2b-256 0309fecea1ae5770836cca7c526be7eb522d5cfe174a0280c101861a102d420d

See more details on using hashes here.

File details

Details for the file compressfiles-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for compressfiles-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a57de751e90e639bf55dc6ce90b969b8a8c562a60a672836ad0c127872b12ede
MD5 1a1fa3ebf65d34877755d9d405b923a0
BLAKE2b-256 de81bfe5bf357eb43297f746113bcb5e9daa3ad244d3ddacef282bc389fb3c36

See more details on using hashes here.

Supported by

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