GCF archive: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Switched most text to past tense and rewrote chunks of the page)
 
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{for|the modern replacement used by the {{l4dbranch|2}} and later, as well as {{src13|2}} and {{src2|2}}, which is also backported to {{src04|2}} to {{src09|2}}| [[VPK (file format)]]}}
{{for|the modern replacement used by current versions of all {{src|2}} and {{src2|2}} games| [[VPK (file format)]]}}
Originally an acronym for '''G'''azelle '''C'''ache '''F'''ile ('''Gazelle''' was an early codename for [[Steam]]), '''GCF''' is now commonly taken to mean '''G'''ame '''C'''ache '''F'''ile. GCFs are the [[Wikipedia:Archive file|archive files]] in which [[Steam]] games are stored and official content is downloaded. GCF files can be shared between games (e.g. <code>source engine.gcf</code>), and are stored in the <code>Steam/SteamApps/</code> folder.
Originally an acronym for '''G'''azelle '''C'''ache '''F'''ile ('''Gazelle''' was an early codename for [[Steam]]), '''GCF''' is now commonly taken to mean '''G'''ame '''C'''ache '''F'''ile. GCFs were the [[Wikipedia:Archive file|archive files]] in which [[Steam]] games were stored and official content was downloaded prior to the introduction of SteamPipe in 2013. GCF files could be shared between games (e.g. <code>source engine.gcf</code>), and were stored in the <code>Steam/SteamApps/</code> folder.


When a GCF is created or updated, the disk space required for it is reserved and content is subsequently downloaded to fill it. This process minimizes fragmentation, but can be slow and appear to make the [[Steam]] client freeze with older, or lower-end hardware and/or software.
The GCF format made keeping tabs on and moving games much easier, ensured time was not wasted by the operating system indexing or otherwise handing the game files, and kept important data away from any custom files the user might have, which were stored under a separate <code>SteamApps/<account>/<game>/</code> folder. They were also used for content validation in multiplayer ([[sv_pure]]). Loading of files from GCF archives was handled entirely by Steam itself and only accessed by the engine through an interface. This made all of the aforementioned behaviors completely transparent to the engine, and also served as a minimal layer of DRM, as a cracked copy of a game that bypassed Steam would no longer be able to read GCFs, requiring that their contents be extracted to disk.


GCF files cannot be altered, and if they could Steam would correct them when it next ran, but their contents can be viewed. [[User:Nem|Ryan "Nemesis" Gregg]] is the developer of [[HLLib]], a library that can among other features read and extract GCF files, and its popular implementation [[GCFScape]]. [[VTFEdit]] is another tool that can browse GCF's even when Steam is running; the only limitation is the lack of the ability to extract folders. There is also [[VTF Explorer]] utility which allows browsing GCF files (you can browse several GCF's even when Steam is running), extracting their contents and building statistical info about files which weren't fully downloaded.
When a GCF was created or updated, the disk space required for it was reserved and content was subsequently downloaded to fill it. This process minimized fragmentation, but could be slow and appear to make the [[Steam]] client freeze with older, or lower-end hardware and/or software.


The GCF format makes keeping tabs on and moving games much easier, ensures time is not wasted by the operating system indexing or otherwise handing the game files, and keeps important data away from any custom files the user might have, which are stored under their /<account>/<game>/ folder.
Generally, GCF files could not be altered. "Invisible" internal rearrangements were possible (such as with GCFScape's defragmentation tool), but any changes to the contents of the files stored in the GCF would cause Steam to correct them when it next ran. Their contents could only be viewed or extracted, and [[#GCF readers|various tools]] have been made to do this.


GCF files can also be encrypted and stored on user's hard disks before the software it contains is released. This means that people are able to start using the software as soon as it is released and spreads the bandwidth usage on the content distribution servers by allowing downloading weeks before the release of the software.
GCF files can also be encrypted. This was used to allow users to preload upcoming software, allowing for almost immediate access on release day without having to wait for a download and spreading out bandwidth usage on the content distribution servers by allowing downloading weeks before the release of the software. The current Steam client still supports this feature, although it is now internally handled differently.


GCF is no longer being used anymore since the transition to [[SteamPipe]] in 2013. It has been replaced with [[.vpk|VPK]], with all games as far old as {{src04|4}} (example: {{vtmb|1|nt=0}}) now ships with {{code|Steam.dll}} file [[Fixing_VPK_mounting_for_older_Source_SDK_Bases|used to mount depot VPK files]] (which requires Steam) instead of GCFs.
GCF files were slowly phased out over time. Starting in {{l4d|2}}, all game files would be stored directly on disk as far as Steam was concerned, with [[VPK]] files included as a replacement which are read by the engine directly. In 2013, [[SteamPipe]] was introduced, phasing out GCF files entirely. All Valve games were updated to {{src13|2}} which backported Left 4 Dead-style VPKs, while the older SDK bases and third-party Source games (such as {{vtmb|2}}) were updated to include a modified {{code|Steam.dll}} file that mounts depot VPK files (albeit [[Fixing_VPK_mounting_for_older_Source_SDK_Bases|somewhat brokenly]]) instead of GCFs.
 
== GCF readers ==
* {{VPKEdit|4}}
* {{gcfscape|4}}
* {{vtfedit|4}} - Can browse GCFs but cannot extract folders
* [[VTF Explorer]] - Can browse GCFs, extract their contents, and build statistical info about files which weren't fully downloaded


== Links ==
== Links ==

Latest revision as of 03:21, 14 September 2025

English (en)中文 (zh)Translate (Translate)
For the modern replacement used by current versions of all Source Source and Source 2 Source 2 games, see VPK (file format).

Originally an acronym for Gazelle Cache File (Gazelle was an early codename for Steam), GCF is now commonly taken to mean Game Cache File. GCFs were the archive files in which Steam games were stored and official content was downloaded prior to the introduction of SteamPipe in 2013. GCF files could be shared between games (e.g. source engine.gcf), and were stored in the Steam/SteamApps/ folder.

The GCF format made keeping tabs on and moving games much easier, ensured time was not wasted by the operating system indexing or otherwise handing the game files, and kept important data away from any custom files the user might have, which were stored under a separate SteamApps/<account>/<game>/ folder. They were also used for content validation in multiplayer (sv_pure). Loading of files from GCF archives was handled entirely by Steam itself and only accessed by the engine through an interface. This made all of the aforementioned behaviors completely transparent to the engine, and also served as a minimal layer of DRM, as a cracked copy of a game that bypassed Steam would no longer be able to read GCFs, requiring that their contents be extracted to disk.

When a GCF was created or updated, the disk space required for it was reserved and content was subsequently downloaded to fill it. This process minimized fragmentation, but could be slow and appear to make the Steam client freeze with older, or lower-end hardware and/or software.

Generally, GCF files could not be altered. "Invisible" internal rearrangements were possible (such as with GCFScape's defragmentation tool), but any changes to the contents of the files stored in the GCF would cause Steam to correct them when it next ran. Their contents could only be viewed or extracted, and various tools have been made to do this.

GCF files can also be encrypted. This was used to allow users to preload upcoming software, allowing for almost immediate access on release day without having to wait for a download and spreading out bandwidth usage on the content distribution servers by allowing downloading weeks before the release of the software. The current Steam client still supports this feature, although it is now internally handled differently.

GCF files were slowly phased out over time. Starting in Left 4 Dead Left 4 Dead, all game files would be stored directly on disk as far as Steam was concerned, with VPK files included as a replacement which are read by the engine directly. In 2013, SteamPipe was introduced, phasing out GCF files entirely. All Valve games were updated to Source 2013 Source 2013 which backported Left 4 Dead-style VPKs, while the older SDK bases and third-party Source games (such as Vampire: The Masquerade – Bloodlines Vampire: The Masquerade – Bloodlines) were updated to include a modified Steam.dll file that mounts depot VPK files (albeit somewhat brokenly) instead of GCFs.

GCF readers

  • VPKEdit VPKEdit
  • GCFScape GCFScape
  • VTFEdit VTFEdit - Can browse GCFs but cannot extract folders
  • VTF Explorer - Can browse GCFs, extract their contents, and build statistical info about files which weren't fully downloaded

Links

External links