How to add a custom header to a PCK file?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By unfa

TheProjectSettings.load_resource_pack() method allows specifying a byte offset to read from a .pck file, but the PCKPacker class that’s use to create such files doesn’t seem to have a way of specifying an offset.

I am trying to make a custom file format that would store some metadata and then the PCK binary block so that my game can first read the metadata before loading the PCK, as there’s no other way to even tell what’s inside without commiting to it and potentially also executing malicious code.

I guess I could create the PCK file on it’s own and then splice it with my header on disk, but that seems a but messy and wasteful.

Is there a missing feature, something undocumented or a different solution to this problem?