9. The computer readable medium of claim 8 , wherein determining a base value and a step value for the escape token using a heuristic modeling function comprises: for each stage, determining a probability of an escape token would be emitted during the respective stage; and maximizing the probability by adjusting different base values and step values as an input to the heuristic modeling function.
9. The computer readable medium of claim 8 , wherein determining a base value and a step value for the escape token using a heuristic modeling function comprises: for each stage, determining a probability of an escape token would be emitted during the respective stage; and maximizing the probability by adjusting different base values and step values as an input to the heuristic modeling function. 10. The computer readable medium of claim 9 , wherein the method further comprises calculating a ratio of an output from the heuristic modeling function in view of the output of the heuristic modeling function plus a number of symbols that have been encoded at a particular stage in order to determine the probability.