/rlec

Bitmap (bmp) file Run-Length Encoding (RLE) compression and decompression command line program, written in ANSI C for Unix/Linux

Primary LanguageCMIT LicenseMIT

rlec

Bitmap (bmp) file Run-Length Encoding (RLE) compression and decompression command line program, written in ANSI C for Unix/Linux.

RLE is a bitmap native lossless compression algorithm. As a consequence, RLE bitmap files resulting from this program are supported by most of image viewers and if so, can be opened as is.

This implementation deals directly with bitmap images without the usage of any third-party library.

Installation

  • Compilation (using gcc) ⇨ ./COMPILE.sh
  • Usage example ⇨ ./EXAMPLE.sh
  • Cleaning (removes binary and test generated files) ⇨ ./CLEAN.sh

Usage

NAME
        rlec - compress/decompress a bitmap file using RLE algorithm

SYNOPSIS
        rlec {-c|-d} [-n=<OUTPUT_FILE_PATH>] <INPUT_FILE_PATH>

OPTIONS
        Compress/decompress the file INPUT_FILE_PATH.

        -c        compression mode
        -d        decompression mode
        -n=<OUTPUT_FILE_PATH>
                   path to output file (default is the same directory as the input file)

File resulting from compression operation is automatically created with the suffix "_rle" added to the name of the input file.
File resulting from decompression operation is automatically created with the suffix "_raw" added to the name of the input file.

Disclaimer

I am not responsible in any way of any consequence of the usage of this piece of software. You are warned, use it at your own risks.