Git Product home page Git Product logo

Comments (9)

panzi avatar panzi commented on June 17, 2024

Hm, if another program also has problems with this maybe the file is corrupted? Do you know that the file is not corrupted?

from u4pak.

BlueAmulet avatar BlueAmulet commented on June 17, 2024

I've been informed by gildor2 that conan has a nonstandard pak format, I'll just modify my copy of u4pak locally for conan support.

from u4pak.

BlueAmulet avatar BlueAmulet commented on June 17, 2024

The problem here actually seems to be that the pak files uses absolute offsets, which gildor's explanation didn't quite make sense to me given that I was able to extract some files successfully, only the ones at the beginning of the pak since their base offset was 0.

The QuickBMS script seems to detect this by seeing if any of the compressed block offsets are less than the file offset, and interpreting them as relative. I don't know if this is part of the conan modifications, but the only modification I read about was extra data before the file entry's filename, which doesn't seem to be happening here.

from u4pak.

panzi avatar panzi commented on June 17, 2024

Does it work with the newest version? Or does it work with this new program (download compiled binary) that I've wrote that doesn't need Python, is faster, and has features that might help Windows users that don't want to use a terminal? :D

from u4pak.

panzi avatar panzi commented on June 17, 2024

Also what version is the pak file? I have seen a pak of version 7 now that has that change of offsets (relative vs absolute). So I know version 1, 2, 3, 4 have absolute offsets, version 7 has compression block offsets relative to the file records. That's probably why some files work to extract and some not: The ones that work are not compressed in the pak.

from u4pak.

BlueAmulet avatar BlueAmulet commented on June 17, 2024

All of the mod pak's are giving me this now with the new version of u4pak.py

Traceback (most recent call last):
  File "u4pak.py", line 1872, in <module>
    main(sys.argv[1:])
  File "u4pak.py", line 1794, in main
    pak = read_index(stream, args.check_integrity, args.ignore_magic, args.encoding, args.force_version, args.ignore_null_checksums)
  File "u4pak.py", line 917, in read_index
    record   = read_record(stream, filename)
  File "u4pak.py", line 631, in read_record_v3
    blocks_bin = st_unpack('<%dQ' % (block_count * 2), stream.read(16 * block_count))
MemoryError

The rust version gives me memory allocation of # bytes failed

The older u4pak.py code as of when this issue was initially created worked fine for the conan mod pak's if the handling of offsets was changed to absolute offsets. The error suggests that it's a V3 pak

from u4pak.

panzi avatar panzi commented on June 17, 2024

Hmmm, what happens if you try it with --force-version=7?

from u4pak.

BlueAmulet avatar BlueAmulet commented on June 17, 2024

Nothing has changed, same errors. I did link the workshop file in the first issue comment if you would like to download and test the pak yourself.

from u4pak.

panzi avatar panzi commented on June 17, 2024

Ah yes! Took a look at that and made a new release: https://github.com/panzi/rust-u4pak/releases/tag/v1.1.0
Does that work for you?

from u4pak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.