I returned to my project of converting Obfuscator and Deobfuscator to be
streams last evening, and finished it up a few minutes ago. The two new
classes are ObfuscatingOutputStream and DeobfuscatingInputStream. What
they produce is exactly the same as Obfuscator and Deobfuscator, but they
do it 3x faster and use almost no memory themselves.
The major drawback of Obfuscator and Deobfuscator is that they required
the whole save or log file to be in memory as a gigantic String (and in
the case of Obfuscator, created a second String twice the size of the
original). I’ve replaced the uses of Obfuscator and Deobfuscator with
the new stream classes, so now we can start modifying the code which
produces the huge Strings to stop doing that.
See trunk@4931 for these changes.