Improved compression by only appending count if the count is more than 2

This commit is contained in:
Ashhar Hasan
2015-10-30 03:06:17 +05:30
parent 6276624914
commit ef77603f9b
2 changed files with 84 additions and 46 deletions

View File

@@ -7,7 +7,7 @@ class TestCompress(object):
assert_equal(func(None), None)
assert_equal(func(''), '')
assert_equal(func('AABBCC'), 'AABBCC')
assert_equal(func('AAABCCDDDD'), 'A3B1C2D4')
assert_equal(func('AAABCCDDDD'), 'A3BCCD4')
print('Success: test_compress')