code: func synchSafe(buf []byte) (int, error) {
  	n := int(0)
  	for _, b := range buf {
  		if (b & (1 << 7)) != 0 {
  			return 0, fmt.Errorf("invalid synchsafe integer")
  		}
  		n |= (n << 7) | int(b)
  	}
  	return n, nil
  }
docs: // synchsafe integers
  // https://en.wikipedia.org/wiki/Synchsafe