Currently, StringEncoder applies abbreviations in a predetermined order, replacing every occurrence of one abbreviation before moving on to the next. This change, based on Matthew Russotto's implementation of R. A. Wagner's optimal parse algorithm, instead analyzes each plaintext string and applies abbreviations in a dynamic order that minimizes the length of the encoded string. [ZILF-236]