Skip to content

Tech-noneX/string-compression-decompression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

String Compression and Decompression

A Python command-line practice project for run-length encoding.

The script can:

  • compress repeated letters, for example aaabbcccc to 3a2b4c
  • decompress count-letter groups, for example 3a2b4c to aaabbcccc
  • choose compression or decompression automatically from the first character of the input

Project Files

  • compression_decompression.py - contains the DeCompression class and the command-line prompt

How To Run

From the project folder:

python compression_decompression.py

Then enter either plain letters or a compressed count-letter string:

aaabbcccc
3a2b4c

Notes

  • Multi-digit counts are supported, such as 12a.
  • The current input detection is simple: input starting with a digit is decompressed, and input starting with a letter is compressed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages