Skip to content
New issue

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

Unhandled Exception: FormatException: ERROR_frameType_unknown #48

Closed
riccardo-runci opened this issue Mar 12, 2024 · 4 comments
Closed

Comments

@riccardo-runci
Copy link

Hello, i'm trying to decompress .pak file, but i'm getting this error

Unhandled Exception: FormatException: ERROR_frameType_unknown

var decompressedData = Lz4Codec().decode(pakBytes);

@sethloco
Copy link
Collaborator

I don’t know much about .pak files, but a cursory look shows that it’s an archive file format (like rar or zip). This library doesn’t read pak files.

If the pak archive contains lz4 compressed data, then a program that reads pak files would need to tell the lz4 decoder the correct offset into the pak file. This is outside the scope of this library

@riccardo-runci
Copy link
Author

I don’t know much about .pak files, but a cursory look shows that it’s an archive file format (like rar or zip). This library doesn’t read pak files.

If the pak archive contains lz4 compressed data, then a program that reads pak files would need to tell the lz4 decoder the correct offset into the pak file. This is outside the scope of this library

what i'm trying to achieve is a dart app like this
https://github.com/Norbyte/lslib/tree/master
that can unzip .pak files, maybe it use lz4 compression

@sethloco
Copy link
Collaborator

Similar to a zip file being composed of entries (files) that use gzip compression, It seems like a pak file is composed of 1 or more entries that may be lz4 compressed.

So Im guessing you need a pak reader to read the “entries”. And each entry could be read with an lz4 decoder.

Just a guess

@riccardo-runci
Copy link
Author

Similar to a zip file being composed of entries (files) that use gzip compression, It seems like a pak file is composed of 1 or more entries that may be lz4 compressed.

So Im guessing you need a pak reader to read the “entries”. And each entry could be read with an lz4 decoder.

Just a guess

Thanks for your suggestion, tonight i can upload a sample file just if you need for testing

@sethloco sethloco closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants