Skip to content

Other DBPF Resources

Noah Severyn edited this page Mar 23, 2024 · 8 revisions

DBPF Libraries

In the SC4 modding world, code was rarely posted or shared publicly so it was common for creators making a new tool to write their own DBPF library with the functionality they needed. Each library thus has varying amounts of implementation depending on the author's specific need(s). For an explanation on the DBPF file implementation, refer to the SC4D Wiki article DBPF. Below is a list of publicly available libraries that I know of:

QFS/RefPack/LZ77 Compression Libraries

DBPF files use QFS compression (also called RefPack), an LZ77/LZSS compression format, for many of their subfiles. This is a propriarity format used in many EA games of this time period, and the exact implementation details can vary for different games. Refer to the Niotso Wiki article RefPack for an overview of this format, and the SC4D Wiki article DBPF Compression for the specific details of this algorithm as implemented in SC4.

Below is a list of all QFS implementations I know of. Many are included as part of the DBPF libraries listed above. Again, due to the independent/decentralized nature of the historical SC4 modding community, many tool authors have created their own implementations with only the features they needed.

Standalone Code Libraries

Library Compression Decompression
jDBPFX (Java)
scdbpf (Scala)
SC4Parser (C#)
dbpf (C)
SC4Mapper 2013 (C)
Sc4D Wiki (PHP)
godbpf (Go)
RefPack (C++)
dbpf (C++)
DBPFSharp (C#)
Simreader (Java)

Included in Tools

Library Compression Decompression Notes
FSHLib (C#)
FSHDatIO (C#)

Unknown Libraries

Based on the number of SC4 modding tools available, there are probably a half dozen or so more DBPF/QFS implementations not accounted for in the lists above, but their source is hidden; either the authors are no longer active in the community or the source code was lost. As new implementations are found they will be added to these lists.