optimized number encoding to use smaller bit size in mid range values