Skip to content

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 code released by EA as a part of the public release of the source code of Command and Conquer: 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 also utilized in RefPack compression code.

Implementations

List of known implementations of the compression algorithm organized by language and format and 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/Format EAC EAC (w/ 32-bit size) Maxis Fusion
C Denis Auroux aluigi3
C# 0xC0000054
Venomalia
rivit
Venomalia
GlitcherOG
pljones & Tiger
gibbed
0xC0000054
Venomalia
Afr0
ambertation
AcK773
C++ EA Games
OmniBlade
KUDr
J.M. Pescado
benrg
Go marcboudreau
Java emd4600 java_dwarf
JavaScript sebamarynissen
Kotlin DarkAtra3
Pascal Banshee3
PHP Delphy3
Python lingeringwillx4
lah7
yukinogatari3
Rust actioninja actioninja
Scala memo33

Footnotes

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

  2. Sega Retro

  3. Decompression code only 2 3 4 5 6

  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