I-Iugo / lzw-tools

LZW tools - School project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lzw-tools

Circle CI Code Climate

LZW tools to compress & decompress

Build in Python 3

Resources

Lempel-Ziv-Welch

Todo:

  • Compression
    • Build Ascii byte list
    • Read file in byte array
    • Compress file
    • Write compressed result in file.lzw
    • CLI/menu-CLI
  • Decompression
    • Build Ascii byte list
    • Read file in byte array
    • Decompress file
    • Write decompressed result in original file
    • Decompressed file size is equal to original file
    • Decompressed file content is the same as the original file content
    • Extract file extension from compressed file - MAGIC NUMBER
    • CLI/menu-CLI
  • Tests
    • Ascii byte list
    • Compression
    • Decompression
    • Automatically build tests : CirleCi
    • Code quality : CodeClimate

Usage

With menu

[lzw-tools] $ python3 sample.py

CLI-menu

Without menu

To simply use the CLI :

  • In sample.py file uncomment import cli and comment # import menu_cli
[lzw-tools] $ python3 sample.py compress -f file.txt
# OUTPUT => Your content is now compressed and is available in: file.lzw
[lzw-tools] $ python3 sample.py decompress -f file.lzw
# OUTPUT => Your content is now decompressed and is available in: file.txt

Tests

[lzw-tools] $ python3 -m tests.make_list_test

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Ensure unit tests
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

Demo

S

For example, GIF images are compressed using the Lempel–Ziv–Welch (LZW) lossless data compression technique.

About

LZW tools - School project

License:MIT License


Languages

Language:Python 100.0%