// Determine the encoded byte length of a nonnegative integer in unsigned LEB128. pub fn uleb_width(value: i64) -> i64 { if value<0 { return -1; } let mut n = value; let mut count = 1; while n >= 128 { n = n/128; count += 1; } count }