The format for the coordinates is slightly obtuse but boils down to using one 16-Bit Short to store the 4-Bit X, 4-Bit Z and 8-Bit Y value of the block coordinate within the chunk.
Bit 15 - 12
Bit 11 - 8
Bit 7 - 0
X
Z
Y
Clientbound
Field
Type
Description
X
Integer
The X position of the chunk
Z
Integer
The Z position of the chunk
Number of Blocks
Short
The number of changed blocks
Block Coordinates
Short Array
Array of Block coordinates in the format described above
Blocktypes
Byte Array
Array of Block types those coordinates change to
Metadata
Byte Array
Array of Block metadata those coordinates change to