code: def _identify_all(header, footer, ext=None):
      
  
      # Capture the length of the data
      # That way we do not try to identify bytes that don't exist
      matches = list()
      for magic_row in magic_header_array:
          start = magic_row.offset
          end = magic_row.offset + len(magic_row.byte_match)
          if end > len(header):
              continue
          if header[start:end] == magic_row.byte_match:
              matches.append(magic_row)
  
      for magic_row in magic_footer_array:
          start = magic_row.offset
          if footer[start:] == magic_row.byte_match:
              matches.append(magic_row)
      if not matches:
          raise PureError("Could not identify file")
  
      return _confidence(matches, ext)
docs: Attempt to identify 'data' by its magic numbers