Improved big number encoding.