streaming: add a function to expand 'Empty' elements into explicit writes

Signed-off-by: David Scott <dave.scott@eu.citrix.com>