Encode binary data within XML/UTF-8 format with minimum overhead