If you use this approach though you might need to very careful about byte order.