code: func (f *CryptoFrame) MaxDataLen(maxSize protocol.ByteCount) protocol.ByteCount {
  	// pretend that the data size will be 1 bytes
  	// if it turns out that varint encoding the length will consume 2 bytes, we need to adjust the data length afterwards
  	headerLen := 1 + utils.VarIntLen(uint64(f.Offset)) + 1
  	if headerLen > maxSize {
  		return 0
  	}
  	maxDataLen := maxSize - headerLen
  	if utils.VarIntLen(uint64(maxDataLen)) != 1 {
  		maxDataLen--
  	}
  	return maxDataLen
  }
docs: // MaxDataLen returns the maximum data length