Skip to content

Unable to create VPKs over 4GB in size #31

@newgreenshoot

Description

@newgreenshoot

I was looking to use this tool for my project. We have a large number of assets, with our materials alone surpassing 6GB. I used the CLI tool to attempt to create a VPK from a folder, and received this error after the file had surpassed 4GB in size:

Traceback (most recent call last):
  File "/home/ccormier/.local/bin/vpk", line 8, in <module>
    sys.exit(main())
  File "/home/ccormier/.local/lib/python3.10/site-packages/vpk/cli.py", line 207, in main
    run(args)
  File "/home/ccormier/.local/lib/python3.10/site-packages/vpk/cli.py", line 171, in run
    create_vpk(args)
  File "/home/ccormier/.local/lib/python3.10/site-packages/vpk/cli.py", line 166, in create_vpk
    new_vpk.save(args.file)
  File "/home/ccormier/.local/lib/python3.10/site-packages/vpk/__init__.py", line 162, in save
    f.write(struct.pack("IHHIIH", checksum & 0xFFffFFff,
struct.error: 'I' format requires 0 <= number <= 4294967295

If this is a strict format limitation, it'd probably be better to not attempt VPK creation and instead warn the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions