variable length integer calc