Skip to content

Large Sims 4 package file fails to open: 'unexpected end of file' error #1

@JWo1F

Description

@JWo1F

I encountered an issue when trying to open a large Sims 4 package file (91.5 MB) using this toolkit. While smaller packages work fine, the large package cannot be opened and triggers the following error:

Error: unexpected end of file
    at genericNodeError (node:internal/errors:983:15)
    at wrappedFn (node:internal/errors:537:14)
    at Zlib.zlibOnError [as onerror] (node:zlib:182:17)
    at processChunkSync (node:zlib:397:12)
    at zlibBufferSync (node:zlib:171:12)
    at syncBufferWrapper (node:zlib:748:14)
    at decompressBuffer (/Users/jwo1f/work/jwo1f/sims4/translater/node_modules/@s4tk/compression/decompress.js:17:41)
    at getResource (/Users/jwo1f/work/jwo1f/sims4/translater/node_modules/@s4tk/models/lib/packages/serialization/read-dbpf.js:331:46)
    at /Users/jwo1f/work/jwo1f/sims4/translater/node_modules/@s4tk/models/lib/packages/serialization/read-dbpf.js:31:20
    at Array.map (<anonymous>) {
  errno: -5,
  code: 'Z_BUF_ERROR'
}

Notes:

  • The same large package works in S4Studio without issue.
  • The error only occurs with this toolkit when opening large files; smaller packages are processed successfully.

Please investigate whether there might be a size limit or buffer handling issue with large packages.

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