Remove explicit endian handling / unroll int encoding loops.