<commit_before>import struct
from core import Block, SubBlock

class Header(Block):
    pass

class LogicalScreenDescriptor(Block):
    def parse(self):
        packed_field = '{0:08b}'.format(int(self.raw[4].encode("hex"), 16))
        self.global_color_flag = int(packed_field[0], 2)
        self.color_resolution = int(packed_field[1:4], 2)
        self.color_table_length = pow(2, self.color_resolution + 1)

class GlobalColorTable(Block):
    pass

class Trailer(Block):
    pass<commit_msg>Fix error reading Global Color Table<commit_after>import struct
from core import Block, SubBlock

class Header(Block):
    pass

class LogicalScreenDescriptor(Block):
    def parse(self):
        packed_field = '{0:08b}'.format(int(self.raw[4].encode("hex"), 16))
        self.global_color_flag = int(packed_field[0], 2)
        self.color_resolution = int(packed_field[1:4], 2)
        self.color_table_length = pow(2, int(packed_field[4:], 2) + 1)

class GlobalColorTable(Block):
    pass

class Trailer(Block):
    pass
{'fraction_non_alphanumeric': 0.12475442043222004, 'fraction_numerical': 0.0275049115913556, 'mean_word_length': 4.146464646464646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4395599', 'n_tokens_mistral': 346, 'n_tokens_neox': 329, 'n_words': 71}