Added function to write out the encoded string to a file. We get the expected size reduction.