def METHOD_NAME(self):
    with self.open() as image:
        hdr = read_header(image)
        if hdr.startswith(b'\x71\xc7') or hdr == b'070701':
            cmd = "cpio --extract --quiet --to-stdout -- 'early_cpio'"
            data = self.run(cmd, image)
            self.early_cpio = data == '1'
        if self.early_cpio:
            skipcpio(image)
            hdr = read_header(image)
        if hdr.startswith(b'\x1f\x8b'):
            cat = "zcat --"
            compression = "gzip"
        elif hdr.startswith(b'BZh'):
            cat = "bzcat --"
            compression = "bz"
        elif hdr.startswith(b'\x71\xc7') or hdr == b'070701':
            cat = "cat --"
            compression = "ascii"
        elif hdr.startswith(b'\x02\x21'):
            cat = "lz4 -d -c"
            compression = "lz4"
        elif hdr.startswith(b'\x89LZO\0'):
            cat = "lzop -d -c"
            compression = "lzop"
        elif hdr.startswith(b'\x28\xB5\x2F\xFD'):
            cat = "zstd -d -c"
            compression = "zstd"
        else:
            cat = "xzcat --single-stream --"
            compression = "xz"
    self._cat = cat
    self.compression = compression