Patent ID: 7065530

Claim:
A method for filling a data structure with a plurality of variable-size data objects, the data structure comprising one or more packets, wherein each packet of the one or more packets comprises a reference count k, k references to variable-size data objects, and at least parts of one or more of the plurality of variable-size data objects, the method comprising for each of the plurality of variable-size data objects, iteratively repeating: designating the variable-size data object; tracking readiness to write one or more designated variable-size data objects to a to-be-filled packet of the one or more packets; when ready to write the one or more designated variable-size data objects to the to-be-filled packet, writing the reference count k to the to-be-filled packet, for the one or more designated variable-size data objects, writing the k references and at least part of each of the one or more designated variable-size data objects to the to-be-filled packet, and preparing to fill a subsequent packet of the one or more packets, wherein the preparing comprises: adjusting a cumulative size value, wherein the cumulative size value measures cumulative size of to-be-written designated variable-size data objects and cumulative size of references to the to-be-written designated variable-size data objects, initializing a total designated variable-size data objects count; and selecting the subsequent packet as the to-be-filled packet.