4 kyu

String Compression Challenge

97 of 98wthit56

Description:

Write a Zipper object that contains two methods: compress(string) should accept a string and return a new string, compressed in some way; and decompress(string) should accept a string as generated with compress, and returns the original string, losslessly. As long as there is some compression on average, and no data is lost or changed, you'll pass the kata. I give you some stats at the end of the test. If you like, you can paste them into the comments at the top of the solution to show how awesome your algorithm is!

I am aware this is a somewhat odd kata to see here on CW. It's more of a challenge than a problem to solve. It will be interesting to see who can make the best algorithm based on this, though...

(NOTE: Must be able to handle empty strings.)

Require has been disabled.

Algorithms

Stats:

CreatedMay 18, 2014
PublishedMay 18, 2014
Warriors Trained574
Total Skips31
Total Code Submissions3224
Total Times Completed98
JavaScript Completions97
Total Stars21
% of votes with a positive feedback rating83% of 43
Total "Very Satisfied" Votes31
Total "Somewhat Satisfied" Votes9
Total "Not Satisfied" Votes3
Total Rank Assessments7
Average Assessed Rank
4 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • wthit56 Avatar
  • Voile Avatar
Ad