First, thanks to Ron for a clever idea. I tweaked it to use an odd/even number of spaces to encode a bit rather than one/two spaces, so that the text could be justified. That makes it harder to see that something fishy is going on. To make the lines come out exactly even, I sometimes had to add a single underscore to a word. The details are in stegenc.java, which does the encoding. The encoder was harder to write than the solution.