We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
respawn.Vpk
Tried https://github.com/Galaxy1036/pylzham and it didn't go well
maps/mp_angel_city.bsp.0053.bsp_lump is a nice small sample to test uses a single VpkFilePart
maps/mp_angel_city.bsp.0053.bsp_lump
>>> compressed_data b'\xd4\x1f\xd3\x1f@\x04\x00\x00\x10\x03,\x03\xbd\x1f\x01\x80\x01q\x80\xc0\x03g\x00)'
>>> filters = { ... "compute_adler32_during_decomp": True, ... "dict_size_log2": 20, ... "unbuffered_decompression": True} >>> lzham.decompress(compressed_data, 40, filters) # raises "ValueError: Decompression failed with status code: 8", adler32 failure
>>> filters = { ... "compute_adler32_during_decomp": False, ... "dict_size_log2": 20, ... "unbuffered_decompression": True} >>> lzham.decompress(compressed_data, 40, filters) b'd\x1b\xfd\xbf\xady\x00\x00unbuffered_decompression\x00comp\x00e\x00'
>>> lzham.decompress(compressed_data, 40, {"dict_size_log2": 20}) # raises "ValueError: Decompression failed with status code: 8", adler32 failure
>>> lzham.decompress(compressed_data, 40, { ... "dict_size_log2": 20, ... "compute_adler32_during_decomp": False}) b'dV\xb2\xbf\xady\x00\x00compute_adler32_during_decomp\x00e\x00'
>>> decompressor = lzham.LZHAMDecompressor(filters) ... decompressor.decompress(compressed_data, 40) b'\x80\xbb\xb3\xbf\xady\x00\x00@LH\xc5\xady\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@R\xfe\xbf\xady\x00\x00'
The text was updated successfully, but these errors were encountered:
I tried to compress the bytes and search for them, but pylzham doesn't give you fine enough control
pylzham
couldn't set LZHAM_COMP_FLAG_DETERMINISTIC_PARSING
LZHAM_COMP_FLAG_DETERMINISTIC_PARSING
Sorry, something went wrong.
For reference, I looked at the lzham implementation in https://github.com/barnabwhy/TFVPKTool/ specifically: src/lzham.cpp
Forking pylzham is an option, but idk how python compiles C++ in the background But presumably I could test that w/ pip:
pip
$ python -m pip install ../pylzham-fork/
snake-biscuits
No branches or pull requests
Tried https://github.com/Galaxy1036/pylzham and it didn't go well
Attempt 1
Attempt 2
Attempt 3
Attempt 4
Attempt 5
The text was updated successfully, but these errors were encountered: