LZW tools to compress & decompress
Build in Python 3
- 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
[lzw-tools] $ python3 sample.py
To simply use the CLI :
- In
sample.py
file uncommentimport 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
[lzw-tools] $ python3 -m tests.make_list_test
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Ensure unit tests
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
For example, GIF images are compressed using the Lempel–Ziv–Welch (LZW) lossless data compression technique.