def GetArchiveInfo(self):
self.searchable = extra.is_searchable(self.file)<EOL>self.lcid = None<EOL>result, ui = chmlib.chm_resolve_object(self.file, '<STR_LIT>')<EOL>if (result != chmlib.CHM_RESOLVE_SUCCESS):<EOL><INDENT>sys.stderr.write('<STR_LIT>')<EOL>return <NUM_LIT:0><EOL><DEDENT>size, text = chmlib.chm_retrieve_object(self.file, ui, <NUM_LIT:4>, ui.length)<EOL>if (size == <NUM_LIT:0>):<EOL><INDENT>sys.stderr.write('<STR_LIT>')<EOL>return <NUM_LIT:0><EOL><DEDENT>buff = array.array('<STR_LIT:B>', text)<EOL>index = <NUM_LIT:0><EOL>while (index < size):<EOL><INDENT>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>if (cursor == <NUM_LIT:0>):<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL>self.topics = '<STR_LIT:/>' + text[index:index+cursor-<NUM_LIT:1>]<EOL><DEDENT>elif (cursor == <NUM_LIT:1>):<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL>self.index = '<STR_LIT:/>' + text[index:index+cursor-<NUM_LIT:1>]<EOL><DEDENT>elif (cursor == <NUM_LIT:2>):<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL>self.home = '<STR_LIT:/>' + text[index:index+cursor-<NUM_LIT:1>]<EOL><DEDENT>elif (cursor == <NUM_LIT:3>):<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL>self.title = text[index:index+cursor-<NUM_LIT:1>]<EOL><DEDENT>elif (cursor == <NUM_LIT:4>):<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL>self.lcid = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL><DEDENT>elif (cursor == <NUM_LIT:6>):<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL>tmp = text[index:index+cursor-<NUM_LIT:1>]<EOL>if not self.topics:<EOL><INDENT>tmp1 = '<STR_LIT:/>' + tmp + '<STR_LIT>'<EOL>tmp2 = '<STR_LIT:/>' + tmp + '<STR_LIT>'<EOL>res1, ui1 = chmlib.chm_resolve_object(self.file, tmp1)<EOL>res2, ui2 = chmlib.chm_resolve_object(self.file, tmp2)<EOL>if not self.topics and res1 == chmlib.CHM_RESOLVE_SUCCESS:<EOL><INDENT>self.topics = '<STR_LIT:/>' + tmp + '<STR_LIT>'<EOL><DEDENT>if not self.index and res2 == chmlib.CHM_RESOLVE_SUCCESS:<EOL><INDENT>self.index = '<STR_LIT:/>' + tmp + '<STR_LIT>'<EOL><DEDENT><DEDENT><DEDENT>elif (cursor == <NUM_LIT:16>):<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL>self.encoding = text[index:index+cursor-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>index += <NUM_LIT:2><EOL>cursor = buff[index] + (buff[index+<NUM_LIT:1>] * <NUM_LIT>)<EOL>index += <NUM_LIT:2><EOL><DEDENT>index += cursor<EOL><DEDENT>self.GetWindowsInfo()<EOL>if not self.lcid:<EOL><INDENT>self.lcid = extra.get_lcid(self.file)<EOL><DEDENT>return <NUM_LIT:1><EOL>
Obtains information on CHM archive.
        This function checks the /#SYSTEM file inside the CHM archive to
        obtain the index, home page, topics, encoding and title. It is called
        from LoadCHM.