Skip to content

Resources for those interested in the Refpack/QFS compression algorithm used in many EA games

Notifications You must be signed in to change notification settings

lingeringwillx/RefPack-QFS-Resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

RefPack/QFS Resources

Resources for those interested in the RefPack/QFS compression algorithm used in many EA games. Also maintains links to known implementations of the compression for easy reference.

About

RefPack is a compression algorithm based on the LZ77/LZSS compression written by Frank Barchard for use in games made by EA1. It can be found in games as early as FIFA International Soccer (1993)2. The algorithm uses different encoding schemes based on the length and position of the data that's being compressed, which allows it to achieve a higher compression ratio compared to other LZ-based algorithms.

The name QFS comes from a file format used in old Need for Speed games in which this algorithm was used. However, the actual name of the algorithm is RefPack1.

Resources

Niotso Wiki: Generic information on the compression algorithm.

Source Code: Official source code released by EA as a part of the public release of the source code of Command and Conquers: Generals - Zero Hour.

Explanation of LZ77/LZSS Compression: RefPack is based on the LZ77 compression algorithm.

Explanation of zlib: zlib is a popular compression library and a lot of the techniques employed in zlib are utilized in RefPack compression code.

Implementations

List of known implementations of the compression algorithm organized by language and compression header for easy reference. A lot of those are rewrites of the same code in another programming language. The quality varies from one implementation to another.

Language/Header EAC Maxis EAC (w/ 32-bit size)
C Denis Auroux
C# 0xC0000054
Venomalia
rivit
0xC0000054
Venomalia
Afr0
ambertation
Venomalia
GlitcherOG
pljones & Tiger
gibbed
C++ benrg EA Games
OmniBlade
KUDr
J.M. Pescado
Go marcboudreau
Java emd4600 java_dwarf
JavaScript sebamarynissen
Kotlin DarkAtra3
PHP Delphy3
Python lingeringwillx4
lah7
Rust actioninja actioninja
Scala memo33

Footnotes

  1. C&C Generals source code: refabout.cpp 2

  2. Sega Retro

  3. Decompression code only 2

  4. C Bindings

About

Resources for those interested in the Refpack/QFS compression algorithm used in many EA games

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published