I don't know the answer to your question but I'm not aware of anyone who does.
The paper referred to in the first article above is Bartol et al. (2015) in eLife (https://cdn.elifesciences.org/articles/10778/elife-10778-v2.pdf). This paper is a proposal of how one might estimate the storage capacity of a synapse. Their current estimate is 4.7 bits per synapse. The article states that more work is needed to get an accurate estimate. The paper does not provide a definitive answer to your question. There is not much research on this subject at the moment, probably because there are still many things we don't yet know about the nature of memory. In time we may find that a completely different method to Bartol's gives a better estimate.
The figure of 1 petabyte is not given in Bartol's paper. This value may have been given in the press release or it could have been calculated by the journalist (by multiplying the estimated synapse capacity by an estimated number of synapses). The estimate of the number of synapses in the brain is the subject of research itself. Bartol's paper says that there are 'many trillions of synapses', which doesn't give us enough information to calculate. The figure needed to get 1 petabyte is around 200 trillion synapses, if my maths is to be trusted. The figure of 1 petabyte is the product of two estimates that may or may not be right, so it's probably not reliable.
The second article is a Professor's response to this question. He says, in essence, that we don't yet know the answer and it would be difficult to calculate.
We still have so much to learn about memory. I suspect it will be some time before we know the answer to your question.