- Overview
- Features
- Technology Stack
- Technical Notes
- Getting Started
- Testing
- Deployment
- Usage
- Configuration
- License
- Community and Support
- Support the Development
- Contacts
FCT Blueprint Compressor is a browser-based utility that takes raw Factorio blueprint strings, decodes and optimizes their JSON payload, then re-compresses them for minimum size and easier distribution across chats, guides, and forums.
The app is intentionally dependency-light (single runtime compression library) and frontend-only, which means no backend, no API latency, and no server-side data retention.
Important
Your blueprint data is processed locally in the browser runtime. Nothing is uploaded by default.
- Blueprint payload optimization
- Recursively strips empty arrays/objects and non-essential defaults (
direction: 0,enabled: true) to reduce JSON noise before compression.
- Recursively strips empty arrays/objects and non-essential defaults (
- Aggressive compression strategy
- Iterates across multiple
pakocompression settings (level+memLevel) and keeps the smallest Base64 result.
- Iterates across multiple
- Safety validation flow
- Includes a verification action that inflates and parses output to catch malformed data before you paste it back into Factorio.
- Live compression telemetry
- Displays original vs compressed character counts plus total and percentage savings.
- Internationalized UI
- Supports multiple locale profiles (
ru,en,uk,kk,cs,nl,sv,de,pl,fr,zh,ja) with persisted language choice.
- Supports multiple locale profiles (
- Zero-build static delivery
- Runs directly from static files, so you can host on GitHub Pages, Cloudflare Pages, Netlify, or any static CDN.
Tip
Bigger blueprints generally produce better compression deltas because structural redundancy is higher.
- Languages: HTML5, CSS3, JavaScript (ES6+)
- Compression Library:
pako@2.1.0 - Architecture: Client-side, static SPA-like interface (without a framework)
- Runtime: Modern web browsers with Base64 +
Uint8Arraysupport - Distribution Model: Static hosting
.
├── index.html # UI markup and script imports
├── style.css # Styling and visual theme
├── script.js # Core logic: i18n, optimize, compress, verify, actions
├── profiles/
│ ├── en.js # English locale dictionary
│ ├── ru.js # Russian locale dictionary
│ └── ... # Other language packs
├── CODE_OF_CONDUCT.md # Community behavior guidelines
├── CONTRIBUTING.md # Contribution workflow and quality gates
├── LICENSE # Apache License 2.0
└── README.md # Project documentation
- Client-only processing
- Chosen to avoid privacy concerns and infrastructure complexity.
- Two-phase optimization
- First optimize JSON semantics, then run deflate; this usually beats brute-force compression on raw input.
- Multi-locale dictionaries
- Locale packs are plain JS objects to keep i18n implementation dead simple and framework-agnostic.
- No bundler by default
- Keeps onboarding friction low and allows instant local runs by opening
index.html.
- Keeps onboarding friction low and allows instant local runs by opening
Note
The project currently pulls pako from a CDN. If your environment is air-gapped, vendor this dependency locally.
You only need:
- A modern browser (
Chrome,Firefox,Edge,Safari) - Optional for local server mode:
Python 3.xorNode.js - Optional for contribution workflow:
Git
# 1) Clone repository
git clone https://github.com/fctostin-team/blueprint-code_compression.git
# 2) Enter project directory
cd blueprint-code_compression
# 3a) Fast path: open directly in browser
# Linux:
xdg-open index.html
# macOS:
open index.html
# Windows (PowerShell):
start index.htmlOptional local static server:
# Python 3 static server
python3 -m http.server 8080
# then open http://localhost:8080There is no dedicated automated test suite yet, but there are reliable manual and sanity checks.
# 1) Run local static server for reproducible tests
python3 -m http.server 8080
# 2) Open app in browser
# http://localhost:8080
# 3) Manual verification checklist:
# - paste a valid blueprint string starting with "0"
# - click Compress
# - verify stats are displayed
# - click Verify
# - confirm success status message
# - switch locale and re-check labels/status textWarning
If the input string does not start with 0, the app rejects it as invalid Factorio blueprint payload.
Because this is a static app, deployment is straightforward.
# Push main branch to GitHub
# In repository settings: Pages -> Deploy from branch -> main /(root)- Point host root to repository root.
- No build command required.
- Publish directory:
.(project root).
Caution
Keep CDN dependencies reachable in production, or switch to local vendored assets for deterministic availability.
1) Paste original Factorio blueprint string in "Original Blueprint" textarea.
2) Hit "Compress Blueprint".
3) Copy generated output from "Compressed Blueprint".
4) Run "Verify" before importing back into the game.
5) Paste verified result into Factorio or share it publicly.
Quick behavior reference:
Input -> Decode Base64 -> Inflate zlib -> Parse JSON
-> Optimize JSON -> Deflate zlib -> Encode Base64
-> Prefix "0" -> Output ready-to-use blueprint string
This project has no required .env file and no backend config.
Config knobs currently available in code:
DEFAULT_LANGUAGEinscript.jscontrols initial locale fallback.profiles/*.jsdefines translatable UI strings.- Compression tuning is hardcoded in
script.js(loops overlevelandmemLevel).
If you need advanced runtime configurability, recommended path is adding a small config.js loaded before script.js.
Distributed under the Apache License 2.0. See LICENSE for legal terms.
Project created with the support of the FCTostin community.
- GitHub: OstinUA
- Team page: FCTostin-team
- Contribution process: see
CONTRIBUTING.md.