The package trailer is intended to an easy format for external code/script to be able to manipulate. To make things clearer we do not serialize containers directly but write out each data structure one at a time so that it should be easy to see how to manipulate the file.