Yapbol is yet another pbo library to unpack and/or modify PBO files used by the game Arma 3.
pip install yapbol
from yapbol import PBOFile
pbo = PBOFile.read_file('filepath.pbo')
# Get metadata.hpp file, that's encoded in utf-8, from the PBO
file = pbo['metadata.hpp']
print('File contents: ', file.data.decode('utf-8'))
from yapbol import PBOFile
pbo = PBOFile.read_file('filepath.pbo')
for file in pbo:
print('File name: ', file.filename)
from yapbol import PBOFile
pbo = PBOFile.read_file('filepath.pbo')
# TODO: Modify the file here
pbo.save_file('filepath.repack.pbo')