Commits

Mathias Panzenböck committed ff79534

information about VPK version 2

Comments (0)

Files changed (2)

 	│                                     │
 	└─────────────────────────────────────┘
 
+Version 2 of VPK has more fields in its header (see below) and more after the
+data section (a footer?). Details are not known at the moment.
 
 #### Value Types
 All values are stored in **little endian**. Offsets and sizes are given in
 If the file doesn't start wit the file magic `0x55AA1234` then the index
 table directly starts at the beginning of the file.
 
+##### Version 1
+
 	Offset  Size  Type  Description
 	     0     4  U32   file magic: 0x55AA1234
 	     4     4  U32   version: 1
 	     8     4  U32   index size
 
+##### Version 2
+
+	Offset  Size  Type  Description
+	     0     4  U32   file magic: 0x55AA1234
+	     4     4  U32   version: 2
+	     8     4  U32   index size
+	    12     4  U32   ?
+	    16     4  U32   footer length? extra CRC length?
+	    20     4  U32   extra size?
+	    24     4  U32   ?
+
 #### Index
 Files are grouped by their type (file name extension).
 	
 accidental collision with the older format is improbable, because these values
 would be very odd ASCII characters for a pathname.
 
+#### Version 1
+
 	 Offset  Count  Type    Description
 	 0x0000      1  U32     File magic: 0x55AA1234
-	 0x0004      1  U32     VPK version, only known version is 1
-	 0x0008      1  U32     Index size. I don't know why this is needed.
+	 0x0004      1  U32     VPK version: 1
+	 0x0008      1  U32     Index size.
+
+#### Version 2
+
+Not much is known about version 2. Currently only Counter Strike: Global
+Offensive is known to use this format.
+
+	 Offset  Count  Type    Description
+	 0x0000      1  U32     File magic: 0x55AA1234
+	 0x0004      1  U32     VPK version: 2
+	 0x0008      1  U32     Index size.
+	 0x000C      1  U32     ?
+	 0x0010      1  U32     Footer length? Extra CRC length?
+	 0x0014      1  U32     Extra size?
+	 0x0018      1  U32     ?
+
 
 ### Body