pub fn write_with_header_mode<E: Encoding, W: Write>( writer: &mut W, root: &RootTag, mode: HeaderWriteMode, ) -> Result<()>