RORK LABJP
SDK58 — The Expo SDK 58 beta is open. It ships the React Native 0.88 release candidate, and the beta period is stated as three to four weeks11/01 — For anyone who requested an extension, Google Play's target API deadline lands on November 1. Forty-four days outEASENV — A long-open report: secrets handed to a local build arrive as the literal variable name rather than its value, and the damage surfaces much laterNEW — The replacement the table recommended had already shut down. A record of reconciling all 74 rows of the deprecation listUISCENE — iOS 27 requires the new scene lifecycle. SDK 57 makes it something you opt into; it only becomes the default in 58CREDIT — What "AI errors don't cost credits" actually covers becomes clear once you record a day of asking for the same fix more than onceSDK58 — The Expo SDK 58 beta is open. It ships the React Native 0.88 release candidate, and the beta period is stated as three to four weeks11/01 — For anyone who requested an extension, Google Play's target API deadline lands on November 1. Forty-four days outEASENV — A long-open report: secrets handed to a local build arrive as the literal variable name rather than its value, and the damage surfaces much laterNEW — The replacement the table recommended had already shut down. A record of reconciling all 74 rows of the deprecation listUISCENE — iOS 27 requires the new scene lifecycle. SDK 57 makes it something you opt into; it only becomes the default in 58CREDIT — What "AI errors don't cost credits" actually covers becomes clear once you record a day of asking for the same fix more than once
Articles/App Dev
App Dev/2026-08-05Intermediate

A JSON File 19% Smaller That Ships Only 3% Smaller — Measuring Catalog Payloads Against gzip

Five payload formats measured on a 20,000-item wallpaper catalog. Key shortening saves just 3.2% after gzip, while a columnar layout cuts 26.8%. Real numbers for Brotli, paging, and JSON.parse time.

Rork569Expo209JSON2gzipperformance11

Premium Article

The catalog for a wallpaper app I operate had quietly grown past 20,000 items. The catalog JSON fetched right after launch weighed about 7MB uncompressed — close to 1MB even with gzip — and on slower connections the delay before first paint had become something you could feel.

The first thing I reached for was key shortening: imageUrl becomes u, fileSize becomes f. The file shrank by 19%, and for a moment I felt I had made progress. Then I measured what actually travels over the wire — the gzipped size — and the saving was 3.2%. A poor return for giving up readable field names.

So where do the real savings live? This is a record of testing each assumption until the numbers answered.

The Setup — a 20,000-Item Synthetic Catalog

Everything was measured with Node v22.22.3 and the built-in zlib module, nothing else. Since I cannot publish the production catalog, I generated synthetic data with the same field structure, using a seeded random generator. The seed is fixed, so running the script reproduces the exact byte counts below.

Each record has twelve fields typical of a wallpaper catalog: ID, title, category, a tags array, resolution, file size, two image URLs, a premium flag, a creation timestamp, and a sort score. Twenty thousand of them.

// gen.js — Node v22.22.3, no dependencies (zlib is built in)
const zlib = require('zlib');
const fs = require('fs');
 
// Seeded PRNG (mulberry32) so every run reproduces the same catalog
function mulberry32(a) {
  return function () {
    a |= 0; a = (a + 0x6D2B79F5) | 0;
    let t = Math.imul(a ^ (a >>> 15), 1 | a);
    t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
    return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
  };
}
const rand = mulberry32(20260805);
const cats = ['nature','city','space','abstract','animal','flower','sea','sky','night','minimal'];
const words = ['sakura','yozora','umi','yama','hikari','kaze','ame','yuki','hoshi','tsuki','asa','yugure','mori','kawa','sora','kumo'];
const pick = (a) => a[Math.floor(rand() * a.length)];
 
const N = 20000;
const items = [];
for (let i = 0; i < N; i++) {
  const id = i + 1;
  const cat = pick(cats);
  items.push({
    id,
    title: `${pick(words)}-${pick(words)}-${String(id).padStart(5, '0')}`,
    category: cat,
    tags: [pick(words), pick(words), pick(words)],
    width: [1080, 1170, 1290][Math.floor(rand() * 3)],
    height: [1920, 2532, 2796][Math.floor(rand() * 3)],
    fileSize: Math.floor(rand() * 4000000) + 200000,
    imageUrl: `https://cdn.example.com/wallpapers/${cat}/${id}/original.jpg`,
    thumbUrl: `https://cdn.example.com/wallpapers/${cat}/${id}/thumb.jpg`,
    premium: rand() < 0.2,
    createdAt: new Date(1600000000000 + Math.floor(rand() * 150000000000)).toISOString(),
    sortScore: Math.round(rand() * 100000) / 100,
  });
}

Against this baseline I prepared four transformations:

// B: shorten every key to one letter (imageUrl → u, etc.)
const KM = { id:'i', title:'t', category:'c', tags:'g', width:'w', height:'h',
             fileSize:'f', imageUrl:'u', thumbUrl:'v', premium:'p', createdAt:'d', sortScore:'s' };
const B = items.map((o) => { const r = {}; for (const k in o) r[KM[k]] = o[k]; return r; });
 
// C: drop both URLs (the client can rebuild them from category and id)
const C = items.map(({ imageUrl, thumbUrl, ...rest }) => rest);
 
// D: columnar — transpose the array of objects into one array per field
const keys = Object.keys(items[0]);
const D = {};
for (const k of keys) D[k] = items.map((o) => o[k]);
 
// E: columnar + URL removal combined
const E = {};
for (const k of keys.filter((k) => k !== 'imageUrl' && k !== 'thumbUrl')) E[k] = items.map((o) => o[k]);
 
// Measure raw / gzip(level 6, 9) / Brotli(quality 11) for each
for (const [name, v] of Object.entries({ A: items, B, C, D, E })) {
  const s = JSON.stringify(v);
  console.log(name, {
    raw: Buffer.byteLength(s),
    gz6: zlib.gzipSync(s, { level: 6 }).length,
    gz9: zlib.gzipSync(s, { level: 9 }).length,
    br11: zlib.brotliCompressSync(s, { params: { [zlib.constants.BROTLI_PARAM_QUALITY]: 11 } }).length,
  });
}

gzip level 6 matches the default of most CDNs and reverse proxies. Brotli runs at quality 11, the setting you would use for precompressed static files.

Five Formats, Measured

The results first. Every reduction percentage is relative to baseline A in the same column.

Formatrawgzip(6)gzip(9)Brotli(11)gzip(6) reduction
A baseline (array of objects)7,035,702943,796891,579691,526
B short keys5,695,702913,189883,867664,434−3.2%
C URLs removed4,185,850745,072704,625559,871−21.1%
D columnar4,695,841691,065648,090556,131−26.8%
E columnar + no URLs2,285,963534,016523,630451,554−43.4%

Notice how the raw reductions and the gzipped reductions refuse to line up. B cuts raw size by 19.0% but ships only 3.2% smaller. C cuts raw by 40.5% yet ships 21.1% smaller. D, meanwhile, cuts raw by 33.3% and keeps most of it — 26.8% — after compression.

The intuition that a smaller file means proportionally lighter delivery simply does not hold once compression sits in the path.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Five payload formats measured on a 20,000-item catalog, with a full comparison table for raw, gzip, Brotli, and JSON.parse time
Why key-name shortening saves only 3.2% after gzip, while transposing to a columnar layout reaches a 26.8% reduction
Splitting into 40 pages costs just 2.9% in size — measured evidence that pagination is nearly free
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $15 for lifetime access
View Membership →

Related Articles

App Dev2026-09-18
The three lines I check when prebuild stops on the standard SDK 57 Swift AppDelegate error
Turning on ios.enableSceneSupport for iOS 27 can stop prebuild cold. The cause was not my SDK version but the shape of AppDelegate.swift. Here are the three lines to check, and why copying the SDK 58 migration steps by hand will break your build.
App Dev2026-09-16
The Token I Deleted Came Back After a Restart — Detecting Failed SecureStore Deletes
On Android, getItemAsync can report null right after sign-out while the value is still sitting on disk. Here is how I rewrote a sign-out path that was verifying deletion by reading instead of by the delete result.
App Dev2026-09-10
Your First EAS Workflow in a Rork Repo, and the Alert That Goes Missing Exactly When You Need It
Putting two files into .eas/workflows in a repo exported from Rork, and why a notification wired with needs stays silent on exactly the nights it fails — with the output of a small local checker I actually ran.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links