def is_scan_v1_ole(scan: olefile.OleFileIO) -> bool: return scan.exists(MAIN_PARAM_STREAM) and scan.exists(SCANS_SUBFOLDER)
def is_scan_v2_ole(scan: olefile.OleFileIO) -> bool: return scan.exists(LSDATAV2_VERSION_FILE) and scan.exists( LSDATAV2_SCANDATA_SUBFOLDER)
def get_xdata(ole: olefile.OleFileIO, header: Header) -> Optional[bytes]: return ole.openstream('X-Data').read() if ole.exists('X-Data') else None