def read_var_header(fd, endian):
mtpn, num_bytes = unpack(endian, '<STR_LIT>', fd.read(<NUM_LIT:8>))<EOL>next_pos = fd.tell() + num_bytes<EOL>if mtpn == etypes['<STR_LIT>']['<STR_LIT:n>']:<EOL><INDENT>data = fd.read(num_bytes)<EOL>dcor = zlib.decompressobj()<EOL>fd_var = BytesIO(dcor.decompress(data))<EOL>del data<EOL>fd = fd_var<EOL>if dcor.flush() != b'<STR_LIT>':<EOL><INDENT>raise ParseError('<STR_LIT>')<EOL><DEDENT>mtpn, num_bytes = unpack(endian, '<STR_LIT>', fd.read(<NUM_LIT:8>))<EOL><DEDENT>if mtpn != etypes['<STR_LIT>']['<STR_LIT:n>']:<EOL><INDENT>raise ParseError('<STR_LIT>'<EOL>'<STR_LIT>'.format(etypes['<STR_LIT>']['<STR_LIT:n>'], mtpn))<EOL><DEDENT>header = read_header(fd, endian)<EOL>return header, next_pos, fd<EOL>
Read full header tag.

    Return a dict with the parsed header, the file position of next tag,
    a file like object for reading the uncompressed element data.