code: func (s *Scanner) readLength(first byte) (int64, error) {
  	length := int64(first & maskFirstLength)
  
  	c := first
  	shift := firstLengthBits
  	var err error
  	for c&maskContinue > 0 {
  		if c, err = s.r.ReadByte(); err != nil {
  			return 0, err
  		}
  
  		length += int64(c&maskLength) << shift
  		shift += lengthBits
  	}
  
  	return length, nil
  }
docs: // the length is codified in the last 4 bits of the first byte and in
  // the last 7 bits of subsequent bytes.  Last byte has a 0 MSB.