This is the main page for my Open Source project cmemgzip.
Current Version is 0.4.4 from 2021-06-27.
cmemgzip compress files in memory, deletes the original, and writes the compressed file, saving the day in situations where your Server ran out of space and you want to keep those heavy logs.
If creates .gz files that later you can uncompress with:
- gunzip
- zcat
- The compressed file explorer from Ubuntu
Url of the project in PyPi: https://pypi.org/project/cmemgzip/
cmemgzip allows to define a block size for the chunks read from disk, limiting the amount of memory needed.
Here you can see a fast worfard compression of a 5.82GB log file in an Amazon Server which ran out of space (0 bytes free) and has 2.8GB of RAM available, using blocks of memory of 500MB.
Get the source code
You can decompress it later with gzip/gunzip.
So about cmemgzip you can git clone the project from here:
https://gitlab.com/carles.mateo/cmemgzip
git clone https://gitlab.com/carles.mateo/cmemgzip
Manual
https://gitlab.com/carles.mateo/cmemgzip/-/blob/master/manual-cmemgzip.pdf
Installation
Install from PIP
Use pip for Python 3 to install the cmemgzip package:
pip3 install cmemgzip
Install cloning from git
Just clone it from the gitlab repository:
git clone https://gitlab.com/carles.mateo/cmemgzip |
There are no third party libraries to install. I only use the standard ones: os, sys, gzip, datetime, time
So clone it with git in your preferred folder and just create a symbolic link with your favorite name:
sudo ln –symbolic /home/carles/code/cmemgzip/cmemgzip.py /usr/bin/cmemgzip |
I like to create the link without the .py extension.
This way you can invoke the program from anywhere by just typing:
cmemgzip
For Windows users, colors are disabled.
See also:
Rules for writing a Comment