inomen87 / GrgOrbit

GNU General Public License v3.0
0 stars 0 forks source link

New spec #3

Open rollinger opened 1 year ago

rollinger commented 1 year ago

Our specification of the compression decompression has change to make grzip even more powerful. We now only compress characters that repeat 5 or more times. The other we leave as is. Also we remove the outer commas.

"aaaaaaaaaabbcccddddeeeeeXXXXXXfgh" -> "(10,a)bbcccdddd(5,e)(6,X)fgh"

Function Signature:

def compress_new_spec(expanded_string, threshold=5, delimiter=["(",")"]):
    return compressed_string