code: func decodeLEB128(input []byte) (uint, []byte) {
  	var num, sz uint
  	var b byte
  	for {
  		b = input[sz]
  		num |= (uint(b) & payload) << (sz * 7) // concats 7 bits chunks
  		sz++
  
  		if uint(b)&continuation == 0 || sz == uint(len(input)) {
  			break
  		}
  	}
  
  	return num, input[sz:]
  }
docs: // Decodes a number encoded as an unsigned LEB128 at the start of some
  // binary data and returns the decoded number and the rest of the
  // stream.
  //
  // This must be called twice on the delta data buffer, first to get the
  // expected source buffer size, and again to get the target buffer size.