Created
November 2, 2017 13:46
-
-
Save Tarliton/32a709034c107298468f081efc0f9f44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vpk | |
def build_cache(path, map_name): | |
pak1 = vpk.open(path) | |
total = 0 | |
for i, f in enumerate(pak1): | |
if map_name in f: | |
print(f'reading {i}', f, pak1[f].file_length) | |
pak1[f].read() | |
total += pak1[f].file_length | |
print('read:', total) | |
if __name__ == '__main__': | |
path = '/home/<USER>/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/pak01_dir.vpk' | |
build_cache(path, 'mirage') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment