move some logic out of loop to save processor, make symbols for compression impossible to collide with user input