Make #encode_{hash,array}_as_packed_to_stream symmetric.