Parent : [[INDEX-FIVEM]]
Extraction RPF récursive (fivefury)
Problème
Archives .rpf GTA/FiveM contiennent des .rpf imbriqués — extraction plate insuffisante.
Solution
def extract_archive(archive, out_dir):
for entry in archive.entries:
if entry.name.lower().endswith(".rpf"):
nested = RpfArchive.from_bytes(entry.read())
extract_archive(nested, out_dir / entry.stem)
else:
(out_dir / entry.name).write_bytes(entry.read())
Routing sortie : fichier dans input/ → dossier à côté ; sinon output/<stem>/.
Entrées : CLI paths, dossiers (rglob *.rpf), ou défaut input/*.rpf.
Source projet
RpfExtractor/extract.pyRpfExtractor/requirements.txt(fivefury)