2 minutes
BGGP5 - epub
Awww a smol epub
How smol? 725 bytes small :3
I wanted to resolve BGGP5 directly from an iframe in an epub, but the challenge data is an octet stream so I can’t render it without JS (please fact me if I’m incorrect!!).
We’ll get around that by hosting a js one-liner on this site to load the contents of https://binary.golf/5/5 as text.
<script>fetch(`https://binary.golf/5/5`).then(r=>r.text()).then(d=>document.write(d))</script>
In the epub an iframe loads the BGGP5 challenge data through my site: https://vvx7.io/5
PoC
vivi …/BGGP/BGGP5/epub_wip ♥ 13:54 7z a -tzip -mx=9 bggp.epub META-INF 1 p ; wc -c bggp.epub
7-Zip [64] 17.05 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.05 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,10 CPUs LE)
Scanning the drive:
1 folder, 3 files, 245 bytes (1 KiB)
Creating archive: bggp.epub
Items to compress: 4
Files read from disk: 3
Archive size: 725 bytes (1 KiB)
Everything is Ok
725 bggp.epub
vivi …/BGGP/BGGP5/epub_wip ♥ 13:54 shasum -a 256 bggp.epub
d3d5b84aab564123a48dd004b41d26e5e30ef6e5d61e8436cb1cf8765508ecb0 bggp.epub
vivi …/BGGP/BGGP5/epub_wip ♥ 13:55 base64 < bggp.epub
UEsDBBQDAAAIAMpu11hti5h7SgAAAFoAAAABAAAAMbPJKMnNUajIzckrtlXKKCkpsNLXLy8v1ys31ssvStc3tLS01K8AqVGys8lMK0rMTVUoLkqGKy0rqzDXy8zXNwVK60PkgQyQejsAUEsDBBQDAAAAAG5t11gAAAAAAAAAAAAAAAAJAAAATUVUQS1JTkYvUEsDBBQDAAAIAG5t11g60BK5KgAAADAAAAAWAAAATUVUQS1JTkYvY29udGFpbmVyLnhtbLNJzs8rSczMSy2ysynKzy9Jy8xJVUgrzcnRLUgsybBVKlDSt7PRRygCAFBLAwQUAwAACACUbddYlYaiqEkAAABrAAAAAQAAAHCzKUhMzk5MT1WoyM3JK7ZVUrKzyU3My0xLLS6xs8ksSc1VyEyxVTJUUsgoSk0DMfTtbPQRKooLMvNSIQqB8kC1SKqgcvpQG+wAUEsBAj8DFAMAAAgAym7XWG2LmHtKAAAAWgAAAAEAJAAAAAAAAAAggKSBAAAAADEKACAAAAAAAAEAGACAF/lelsXaAQCukV+WxdoBgBf5XpbF2gFQSwECPwMUAwAAAABubddYAAAAAAAAAAAAAAAACQAkAAAAAAAAABCA7UFpAAAATUVUQS1JTkYvCgAgAAAAAAABABgAAGDy2pTF2gEAYPLalMXaAQBg8tqUxdoBUEsBAj8DFAMAAAgAbm3XWDrQErkqAAAAMAAAABYAJAAAAAAAAAAggKSBkAAAAE1FVEEtSU5GL2NvbnRhaW5lci54bWwKACAAAAAAAAEAGAAAYPLalMXaAYD2ituUxdoBAGDy2pTF2gFQSwECPwMUAwAACACUbddYlYaiqEkAAABrAAAAAQAkAAAAAAAAACCApIHuAAAAcAoAIAAAAAAAAQAYAAC03AWVxdoBgEp1BpXF2gEAtNwFlcXaAVBLBQYAAAAABAAEAGkBAABWAQAAAAA=
vivi …/BGGP/BGGP5/epub ♥ 12:14 meow
An epub with all the junk stripped out is pretty small. I’ll try to golf the zip itself to make this smaller.
bggp5.epub
├── META-INF
│ └── container.xml
├── p (.opf file)
└── 1 (.xhtml file)
container.xml
<container><rootfile full-path="p"/></container>
.xhtml file
<html xmlns="http://www.w3.org/1999/xhtml"><iframe src="http://vvx7.io/5"></iframe></html>
.opf file
<package xmlns=""><manifest><item id="1" href="1"/></manifest><spine><itemref idref="1"/></spine></package>