When exiting, a summary of the size of all segments (grouped by type: data,
metadata, ...) is printed. Extend this so that both the uncompressed and
compressed sizes of the segments are printed, and to do so now also keep
track of the compressed size of data.