code: def _ReadSpecificationFile(self, path):
      
      specification_store = specification.FormatSpecificationStore()
  
      with io.open(
          path, 'rt', encoding=self._SPECIFICATION_FILE_ENCODING) as file_object:
        for line in file_object.readlines():
          line = line.strip()
          if not line or line.startswith('#'):
            continue
  
          try:
            identifier, offset, pattern = line.split()
          except ValueError:
            logger.error('[skipping] invalid line: {0:s}'.format(line))
            continue
  
          try:
            offset = int(offset, 10)
          except ValueError:
            logger.error('[skipping] invalid offset in line: {0:s}'.format(line))
            continue
  
          try:
            # TODO: find another way to do this that doesn't use an undocumented
            # API.
            pattern = codecs.escape_decode(pattern)[0]
          # ValueError is raised e.g. when the patterns contains "\xg1".
          except ValueError:
            logger.error(
                '[skipping] invalid pattern in line: {0:s}'.format(line))
            continue
  
          format_specification = specification.FormatSpecification(identifier)
          format_specification.AddNewSignature(pattern, offset=offset)
          specification_store.AddSpecification(format_specification)
  
      return specification_store
docs: Reads the format specification file.
  
      Args:
        path (str): path of the format specification file.
  
      Returns:
        FormatSpecificationStore: format specification store.