Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
Write an algorithm which can increase the size of data passed into it without adding any redundant bits. (Think it as opposite of compressing the data)

 Make another algorithm to reverse the process above so we can get original data.

 write python scripts for both which at least can extend strings


What I have tried:

I have tried converting the ascii value of charachters so that compressing could be done
Posted
Updated 27-Sep-17 5:57am
Comments
pt1401 27-Sep-17 12:56pm    
This is a homework question.
There is short-term benefit, but no long-term benefit, in us doing your homework for you.
Long-term benefit is what's important.
It's *your* homework - *you* need do do it so that *you* can learn programmimg.
Arthur V. Ratz 27-Sep-17 14:24pm    
Have you read article from my solution ?

1 solution

Probably, this article would be interesting to you: Implementing the Huffman adaptive algorithm to compress 256 colors depth graphics images[^].

If you've got any more questions, just feel free to post them as the reply to my solution that comes here. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900