Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

  1. On disk format of directory (xxx_dir.vpk. data is in xxx_000.vpk, xxx_001.vpk, ...)
  2. id
  3. records
  4. "extension\0" (0 = no more extensions)
  5. "dir\0" (0 = no more dirs)
  6. "basefilename\0" (0 = no more files of this extension in this dir)
  7. orig data file crc
  8. int16 metadata size
  9. location in data files for level 0 data (word filenum, ulong offset, ulong fsize)
  10. location in data files for level 1 data (word filenum, ulong offset, ulong fsize) ..
  11. -1.
  12. uint8 metadata[]
  13. ..
  14. ..
  15. ..
  16. data files
  17. [x]step0 - class def, format def
  18. [x]step1 - generator
  19. [x]step2 - loader
  20. [ ]step3 - surrounding file monitor tools + ui
  21. A client of the archive who can't handle their persistent meta data going away (as during
  22. a reload) can say so, which will cuase their metadata to be copied away at next reload. otherwise,
  23. a reload will change the address of the meta data and maybe its size/content.
  24. insert
  25. case file found:
  26. find all files in the same data chunk
  27. load data chunk.
  28. replace old chunk of data, changing offsets in parts of files that were there.
  29. replace offset and crc in old dir record
  30. case file not found
  31. might need to add new extension
  32. might need to add new directory
  33. insert new file entry
  34. add new data to last chunk