Large container specification revision, factor out common routines for encode/decode page.