def __init__(self, header, name, elffile):
    self.header = header
    self.name = name
    self.elffile = elffile
    self.stream = self.elffile.stream
    self.structs = self.elffile.structs
    self._compressed = (header['sh_flags'] & SH_FLAGS.SHF_COMPRESSED)
    if self.compressed:
        header = struct_parse(self.structs.Elf_Chdr, self.stream, stream_pos=self['sh_offset'])
        self._compression_type = header['ch_type']
        self._decompressed_size = header['ch_size']
        self._decompressed_align = header['ch_addralign']
    else:
        self._decompressed_size = header['sh_size']
        self._decompressed_align = header['sh_addralign']
def __init__(self, header, name, elffile):
    self.header = header
    self.name = name
    self.elffile = elffile
    self.stream = self.elffile.stream
    self.structs = self.elffile.structs
    self._compressed = (header['sh_flags'] & SH_FLAGS.SHF_COMPRESSED)
    if self.compressed:
        header = struct_parse(self.structs.Elf_Chdr, self.stream, stream_pos=self['sh_offset'])
        self._compression_type = header['ch_type']
        self._decompressed_size = header['ch_size']
        self._decompressed_align = header['ch_addralign']
    else:
        self._decompressed_size = header['sh_size']
        self._decompressed_align = header['sh_addralign']