Skip to content

Add FFI ZLib library and trader Gzip - #2502

Closed
vaisest wants to merge 4 commits into
PathOfBuildingCommunity:devfrom
vaisest:gzip
Closed

Add FFI ZLib library and trader Gzip#2502
vaisest wants to merge 4 commits into
PathOfBuildingCommunity:devfrom
vaisest:gzip

Conversation

@vaisest

@vaisest vaisest commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

In 0.5.5 the trader API was changed slightly. It seems that the old way of using it still works, but as far as I understand, some of the old functonality will be gone in ~1 month. The changes are:

  • Short codes were replaced by B64 GZipped JSON. This is similar to the ?q= parameter, with the exception that it only has the query field. I.e. you can't set the sort order with it.
  • A GET search endpoint was removed. This is fine since now there's no need to fetch the short code IDs since we can just decode them.
  • GZip was implemented by adding a library which has bindings for the ZLib dll we already provide. This also has the added benefit of working with the headless wrapper, which should solve some PoB1 problems as it uses ZLib compressed data (the files called .zip despite not being zip)

Steps taken to verify a working solution:

  • Buy similar works
  • Unauthorized trader link works
  • User-provided url authorized search works
  • Authorized search flow works
  • Tests updated

Comment thread runtime/lua/ffi-zlib.lua

local zlib
if ffi.os == "Windows" then
zlib = ffi.load("../runtime/zlib1")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I changed this so that only the PoB zlib is used. Otherwise the file is just https://github.com/hamishforbes/lua-ffi-zlib/blob/master/lib/ffi-zlib.lua

@vaisest vaisest added bug Something isn't working pob2 labels Sep 4, 2026
@vaisest vaisest changed the title Fix trader for 0.5.5: add FFI ZLib library Add FFI ZLib library and trader Gzip Sep 5, 2026
@vaisest vaisest added technical Hidden from release notes pob1 Should also be merged into PoB1 Repo and removed bug Something isn't working pob2 labels Sep 5, 2026
@vaisest vaisest closed this Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pob1 Should also be merged into PoB1 Repo technical Hidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant