Added (int) casts to de/encoding

A little addition to the discussion around issue #14
about de-/encoding floats