update algorithm to compress simple strings
update algorithm to decompress simple strings
fix decompress algorithm
add a flag for output handler