pub const MAGIC: [u8; 4] = *b"TZif";
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub struct Counts {
pub isutcnt: u32,
pub isstdcnt: u32,
pub leapcnt: u32,
pub timecnt: u32,
pub typecnt: u32,
pub charcnt: u32,
}
pub fn write_header(out: &mut Vec<u8>, version: u8, counts: &Counts) {
out.extend_from_slice(&MAGIC);
out.push(version);
out.extend_from_slice(&[0u8; 15]); out.extend_from_slice(&counts.isutcnt.to_be_bytes());
out.extend_from_slice(&counts.isstdcnt.to_be_bytes());
out.extend_from_slice(&counts.leapcnt.to_be_bytes());
out.extend_from_slice(&counts.timecnt.to_be_bytes());
out.extend_from_slice(&counts.typecnt.to_be_bytes());
out.extend_from_slice(&counts.charcnt.to_be_bytes());
}