Rosa Del Mar

Daily Brief

Issue 58 2026-02-27

Range-Requests As A Remote Binary-Search Primitive Over Large Static Files

Issue 58 Edition 2026-02-27 5 min read
General
Sources: 1 • Confidence: High • Updated: 2026-04-12 10:09

Key takeaways

  • The demo accepts either a single character or a hexadecimal Unicode codepoint input and displays the intermediate steps of the binary search through the large file.
  • HTTP Range-request techniques are not compatible with HTTP compression because compression breaks byte-offset calculations.
  • The tool was deployed to tools.simonwillison.net and queries a CORS-enabled 76.6MB file hosted in S3 and fronted by Cloudflare using Range requests.
  • Claude was used to generate a specification and Claude Code for web was used to turn it into working code via an asynchronous research workflow.
  • A prototype was built from a phone as an experiment in using HTTP Range requests.

Sections

Range-Requests As A Remote Binary-Search Primitive Over Large Static Files

  • The demo accepts either a single character or a hexadecimal Unicode codepoint input and displays the intermediate steps of the binary search through the large file.
  • A prototype was built from a phone as an experiment in using HTTP Range requests.
  • The prototype searches a large file by performing a binary search implemented via HTTP Range requests.
  • A proposed use case for the approach is looking up Unicode codepoint metadata by searching through many megabytes of data.
  • This Range-request binary-search approach requires data that is naturally sorted to be useful.

Correctness Constraint: Range Requests Require Stable Byte Offsets (No Http Compression)

  • HTTP Range-request techniques are not compatible with HTTP compression because compression breaks byte-offset calculations.

Deployment Pattern: Browser-Accessible Partial Reads Against Cdn-Fronted Object Storage

  • The tool was deployed to tools.simonwillison.net and queries a CORS-enabled 76.6MB file hosted in S3 and fronted by Cloudflare using Range requests.

Ai-Assisted Prototyping Workflow From Spec To Implementation

  • Claude was used to generate a specification and Claude Code for web was used to turn it into working code via an asynchronous research workflow.

Unknowns

  • What are the observed latency and request-count characteristics for typical lookups (e.g., number of Range requests per query, median/worst-case time)?
  • What is the egress and CDN cost profile of repeated interactive queries against the 76.6MB file (including cache hit rates and byte-transfer per query)?
  • How is HTTP compression practically handled end-to-end (origin, CDN, browser) to guarantee stable byte offsets for Range responses?
  • What file format and record layout is used to make binary search feasible (e.g., fixed-width records vs variable-length lines), and what are the failure modes when records are variable-length?
  • What cross-browser and CDN interoperability issues were encountered (Range semantics, CORS edge cases, caching behavior), if any?

Investor overlay

Read-throughs

  • Range requests enable browser-side querying of large static files on commodity S3 plus CDN setups, suggesting incremental demand for reliable partial-content delivery, CORS, and cache behavior in CDNs and object storage when developers adopt this pattern.
  • The no-compression constraint highlights a correctness tradeoff that could drive demand for CDN and origin controls that guarantee stable byte offsets, potentially influencing how teams configure delivery for data files used with range-based lookup.
  • AI-assisted prototyping from spec to working code indicates tooling workflows where LLMs and coding agents accelerate experimentation, potentially increasing the pace of small web-deployed demos and internal tools that rely on CDN-hosted assets.

What would confirm

  • Broader publication of benchmarks showing acceptable latency and request counts for typical lookups, plus evidence of repeated interactive usage without prohibitive egress or CDN costs.
  • Clear, repeatable deployment guidance demonstrating how to disable or avoid compression end to end while preserving CORS, caching, and correct Range semantics across common CDNs and browsers.
  • Reports of additional tools or deployments adopting the same architecture pattern of browser-accessible range reads against a single large sorted file hosted on object storage and fronted by a CDN.

What would kill

  • Observed lookup performance is poor due to high request counts, high median latency, or worst-case tail latency that makes interactive use impractical in browsers.
  • Egress and CDN billing for interactive queries is uneconomic because cache hit rates are low or byte transfer per query is high, limiting practical deployments.
  • Interoperability issues with Range handling, caching, CORS, or inadvertent compression across browsers or CDNs cause incorrect results or fragile deployments.

Sources