Changed generateCodeMap to also return the symbol list per code length.
Fixed nasty bug where any \n byte written to the jpeg output stream was actually written as \r\n.