code: func encodeLength(n uint32) uint32 {
  	var value, digit uint32
  
  	for n > 0 {
  		if value != 0 {
  			value <<= 8
  		}
  
  		digit = n % 128
  
  		n /= 128
  
  		if n > 0 {
  			digit |= 0x80
  		}
  
  		value |= digit
  	}
  
  	return value
  }
docs: // encodeLength encodes the unsigned integer
  // by using a variable length encoding scheme.