calculate payload size when header block is set