pub fn write_bwm_to_vec(bwm: &Bwm) -> Result<Vec<u8>, BwmBinaryError>
Serializes BWM data to a byte vector.