Fixed some mem-map issues around floats and chars.
Fixed header-with-char issue in encode.