"""Minimal reader of Enshrouded's KFC4 container: raw content blobs by their content key. enshrouded.kfc header: 17 KFCLocation entries (u32 offset relative to the entry, u32 count) at 16 + i*8. Location 1 = .dat containers, 7 = content keys (size, hash0, hash1, hash2), 8 = values (offset u32, flags u16, container index u16, 8 bytes pad). Blobs live in enshrouded_NNN.dat. """ import pathlib import struct class KFC: def __init__(self, game): self.game = pathlib.Path(game) b = (self.game / "enshrouded.kfc").read_bytes() assert b[:4] == b"KFC4", "not a KFC4 file" locs = [] for i in range(17): pos = 16 + i * 8 off, cnt = struct.unpack_from("