cmemgzip

This is the main page for my Open Source project cmemgzip.

Current Version is 0.4.2 from 2021-03-24.

PIP Download page.

cmemgzip v.0.4.2 running in the sample Docker Container provided.
Here compressing an .ISO file from Ubuntu 18.04. Obviously we save few space as ISO files are already compressed.

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

cmemgzip allows to define a block size for the chunks read from disk, limiting the amount of memory needed.

cmemgzip running in Windows 10 Home 64 bit and using 100MB blocks

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, please use version 0.4 that doesn’t support colors (incompatible windows Windows Command Line).

This will be addressed in next version 0.4.2.

Views: 143 views