Home - MajickTek/XFF-SPEC GitHub Wiki

Welcome to the XFF-SPEC wiki!

This is where the complete specifications for the XFF-compatible file formats are.

What is XFF?

XFF is a base (empty) file format which can be extended in all directions and be used for anything, including but not limited to:

  • Package/Archive formats (like .ZIP or like ID Software's .PK3)
  • Binary config formats (like an IDE's project format)
  • Binary map/level formats for games (like VALVE'S .BSP)
  • Multimedia formats (like sound, image, or video formats; i.e. .MP3/.PNG/.AVI)
  • ...And much more!...

Technical Stuff

Each specification will contain pseudo-Java code to show the structure of the file header. The base files were created from this informative website

Here is some stuff you need to know:

There are several different data types used in the pseudocode. here is the list:

  • S8: Signed 8-bit Integer (Min. value is -128, Max. value is 127)
  • S16: Signed 16-bit Integer (Min. value is -32768, Max. value is 32767)
  • S24: Signed 24-bit Integer (Min. value is -8388608, Max. value is 8388607)
  • S32: Signed 32-bit Integer (Min. value is -2147483648, Max value is 2147483647)
  • U8: Unsigned 8-bit Integer (Min. value is 0, Max. value is 255)
  • U16: Unsigned 16-bit Integer (Min. value is 0, Max. value is 65535)
  • U24: Unsigned 24-bit Integer (Min. value is 0, Max. value is 16777215)
  • U32: Unsigned 32-bit Integer (Min. value is 0, Max. value is 4294967295)

Now that that is out of the way, here is the basic file header so you know what you will be getting into:

HEADER
{
  signature U24
  version U8
  length U32
}

Here is the equivalent Java program (for example):

class HEADER
{
  public int signature; //U24
  public int version; //U8
  public long length; //U32
}

The structures for the different files will be give. in the other wiki pages. Not all files will have their equivalent Java classes like the one above.