Palbox
A breeding planner for Palworld that parses a real game save in the browser pipeline and solves multi-generation breeding paths.
Palworld stores its save data in a compressed proprietary format. To plan breeding properly you need to know what the player actually owns, which means decoding that save. The community decompressor is a hand-written C++ extension, and the repository shipped only a macOS ARM build.
Getting it running meant building it for linux/amd64 inside a container, verifying it decoded a real save byte-correctly, and confirming the timing: 15.5x decompression in under a tenth of a second as a non-root user.
The architecture question that took the longest was not technical. Storing user saves means storage cost, a cleanup job, and a real privacy surface. Measuring the two data types settled it: the derived box snapshot is 1.1 MB and stale within hours, while the plans a user actually authors total about 13 KB and stay useful for months. So the system stores plans, not saves, and the uploaded file never needs to touch disk.
Details worth knowing
- 01Cross-compiled a hand-written C++ save decompressor to linux/amd64 and verified byte-correct output against a live save.
- 02Measured the data before designing the storage: 1.1 MB of derived state versus 13 KB of authored state, which removed the storage cost, the cleanup job, and most of the privacy surface at once.
- 03Split deployment on Cloud Run: a small web service that scales to zero and a memory-heavy parser service with no egress.
- 04Treats untrusted uploads feeding a hand-written C++ decompressor as the primary security concern, with size, time, and memory caps at the boundary.
- 05Repository extraction took the project from 6.1 GB to 14 MB with the quality gate green.