A package is serialized as a sequence of compact binary fields with no name. The object may be both preceded and followed by attachments. The object is only serialized when it is non-empty, starting with its hash, in a Hash field, followed by the object, in an Object field. A package ends with a Null field. The canonical order of components is the object and its hash, followed by the attachments ordered by hash, followed by a Null field. It is valid for the a package to have its attachments serialized in any order relative to each other and to the object.