3.1.5.4.2 IDSET Serialization
There are two different formats in which a serialized IDSET structure, as specified in section 2.2.2.4, can exist on the wire. The only difference is how the REPLID structure is represented in the serialization buffer. The first format contains the REPLID followed by the GLOBSET, as specified in section 2.2.2.6, and is used by the following properties: MetaTagIdsetDeleted (section 2.2.1.3.1), MetaTagIdsetNoLongerInScope (section 2.2.1.3.2), MetaTagIdsetExpired (section 2.2.1.3.3), MetaTagIdsetRead (section 2.2.1.3.4), and MetaTagIdsetUnread (section 2.2.1.3.5). The second format contains, instead of the REPLID, the REPLGUID that is associated with the REPLID, followed by the GLOBSET, and it is used by the following properties: MetaTagIdsetGiven (section 2.2.1.1.1), MetaTagCnsetSeen (section 2.2.1.1.2), MetaTagCnsetSeenFAI (section 2.2.1.1.3), MetaTagCnsetRead (section 2.2.1.1.4). No information contained in the serialized buffer identifies which format is being used. The context in which the serialized IDSET structure is being used on the wire dictates which format MUST be used: if an IDSET was persisted or is intended to be persisted across sessions, such as when it represents a portion of an ICS state, as specified in section 2.2.1.1, it MUST be transmitted in the REPLGUID-based form. If it's only a part of a transient set of data, like IDs of items that were deleted since the last synchronization, as specified in section 2.2.1.3.1, it MUST be transmitted in a REPLID-based form. Sections 3.1.5.4.3 through section 3.1.5.4.3.2.5 specify the layout of both formats on the wire. REPLID-based format can be converted to REPLGUID-based format by using mapping operations, as specified in [MS-OXCSTOR].
For more details about the format of each serialized IDSET structure, see section 2.2.2.4.