Defined in:Writes a chunk type and begins measuring the size of a chunk in the output stream.
PackHandle BeginChunk(uint32 type);
||The chunk type.|
BeginChunkfunction writes the four-byte chunk type specified by the
typeparameter to the output stream and then reserves four bytes in the output stream to which the size of the chunk is later written. This function returns a handle that should be passed to the
Packer::EndChunkfunction. When the
EndChunkfunction is called, the number of bytes written to the output stream since the matching call to
BeginChunkis written into the four-byte location immediately following the chunk type.
IMPORTANT. In order to maintain four-byte alignment in the output stream, the number of bytes written between calls to the
EndChunkfunction must be a multiple of four.