This way, we can preallocate the necessary sizes for segments and sections upfront rather than doing it per parsed atom.