code: func FrameHeaderSize(s int64) int {
  	size := 1
  	for s >>= 7; s > 0; s >>= 7 {
  		size++
  	}
  	return size
  }
docs: // FrameHeaderSize calculates the size of the RecordIO frame header for a given
  // amount of data.
  //
  // A RecordIO frame header is a Uvarint containing the length. Uvarint values
  // contain 7 bits of size data and 1 continuation bit (see encoding/binary).