{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreihdeg7f3uxsmhhuh4tpgmojksojeavacpcaa5ppglue2trhfso5vi",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mh5iuylpdtd2"
},
"path": "/t/part-2-of-data-storage-method-based-on-3-14/174290#post_1",
"publishedAt": "2026-03-15T18:24:13.000Z",
"site": "https://discuss.huggingface.co",
"tags": [
"http://localhost:8000/retrieve/YOUR_STORAGE_ID_HERE",
"http://localhost:8000/simulate-failure/2/3",
"http://localhost:8000/status"
],
"textContent": "Not sure if it would even work?\n\n\n \"3.14159265358979323846264338327950288419716939937510\",\n\n \"use_formula\": true,\n\n \"servers\": 3,\n\n \"disks_per_server\": 5\n\n\n}’\n\n# Retrieve it back\n\ncurl http://localhost:8000/retrieve/YOUR_STORAGE_ID_HERE\n\n# Simulate disk failure\n\ncurl -X POST http://localhost:8000/simulate-failure/2/3\n\n# Check system status\n\ncurl http://localhost:8000/status\n\n# Example: Storing 1 million Pi digits\n\nraw_digits = 1_000_000\n\nraw_bytes = raw_digits # 1 byte per digit ASCII\n\n# Hybrid approach:\n\n# • 70% matched as Pi sequences → stored as formula refs (~24 bytes each for 100-digit chunks)\n\n# • 30% compressed → ~40% of original after nibble+zstd\n\nformula_chunks = (raw_digits * 0.7) / 100\n\nformula_bytes = formula_chunks * 24\n\ncompressed_digits = raw_digits * 0.3\n\ncompressed_bytes = (compressed_digits * 0.5) # ~50% compression after nibble+zstd\n\ntotal_stored = formula_bytes + compressed_bytes\n\nratio = (1 - total_stored/raw_bytes) * 100\n\nprint(f\"Raw: {raw_bytes/1e6:.2f} MB\")\n\nprint(f\"Stored: {total_stored/1e6:.2f} MB\")\n\nprint(f\"Compression ratio: {ratio:.1f}%\")\n\nprint(f\"1 TB raw → ~{(1e12 * (1-ratio/100))/1e12:.2f} TB stored\")\n\nFROM python:3.11-slim\n\nRUN pip install fastapi uvicorn zstandard mpmath\n\nCOPY api_server.py .\n\nCMD [“uvicorn”, “api_server:app”, “–host”, “0.0.0.0”, “–port”, “8000”]",
"title": "Part 2 of Data Storage Method based on 3.14"
}