http://qkpm2ov2rjhjkhfsftskqho77uj5rewd5y44unkf6cb7tdhaxwcvh2id.onion/books/dbpf/DBPF%20Compression%20-%20SC4D%20Encyclopaedia.html
Thus, the algorithm to decompress these files goes like this: Read the first 4 bytes, this is the size of the following header + compressed data. (Only if the QFS compressed data is in an older DBPF file, in SimCity 2013 and possibly other games like Spore these redundant 4 bytes are not here).