Skip to content

INFLATE.LUA uses too much memory for large memory model interpreters #1

Description

@Lethja

While INFLATE.LUA can successfully extract deflate and deflate64 compressed files from a zip (as demonstrated in its unit test) it uses way too many Lua tables to do so. On modern machines such as the ones that run the GitHub workflow this is inconsequential. On retro machines with limited memory and processing power however, it becomes unbearably slow; that is, if it's usable at all.

This issue can be worked around by packing arrays and tables into strings and using string.unpack() on data when it's actually required. Although more tricky that a pure table approach the memory and computational savings are significant which should allow INFLATE.LUA to run much better on retro machines. The start of this conversion can be seen in commit cd112c7.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions