Skip to content

Python-based implementation of the LZW (Lempel-Ziv-Welch) algorithm to compression and decompression of text files.

License

Notifications You must be signed in to change notification settings

amycardoso/lzw-text-file-compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LZW Text Compressor and Decompressor

GitHub license GitHub stars

The main objective of this project is to put into practice the theoretical concepts approached in the classroom related to media coding techniques. For this, a compressor and a decompressor of text were developed using the Lempel-Ziv-Welch (LZW) algorithm with fixed dictionary size. Data entry is a TXT document whose output is a binary file containing the compressed data.

Requirements

  • Python 3

Usage

The compressor operates by command-line, accepting as parameter the name and path of the original TXT file, as well as the name and path of the binary file to be generated. The decompressor will also be command-line operated, accepting both parameters as well (binary input file and output TXT file). The following execution format must be obeyed:

For compression:

$ python3 lzw.py compress -i original_file.txt -o binary_file.bin

For decompression:

$ python3 lzw.py decompress -i binary_file.bin -o uncompressed_file.txt

For help:

$ python3 lzw.py -h

About

Python-based implementation of the LZW (Lempel-Ziv-Welch) algorithm to compression and decompression of text files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages