<feed xmlns='http://www.w3.org/2005/Atom'>
<title>clectio.git/puff.h, branch v1.0</title>
<subtitle>tiny suckless C daily readings, floppy sized, bring your own Bible</subtitle>
<id>https://git.labunix.xyz/clectio.git/atom?h=v1.0</id>
<link rel='self' href='https://git.labunix.xyz/clectio.git/atom?h=v1.0'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/clectio.git/'/>
<updated>2026-07-28T22:49:47Z</updated>
<entry>
<title>perf: DEFLATE (puff) + -no-pie -&gt; OF binary 879 KB -&gt; 662 KB (-25%)</title>
<updated>2026-07-28T22:49:47Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-28T22:49:47Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/clectio.git/commit/?id=302897c5e8d61db9107505ba929f9abfc197896d'/>
<id>urn:sha1:302897c5e8d61db9107505ba929f9abfc197896d</id>
<content type='text'>
Two size wins:

- Replace the home-grown LZSS (2.0x) with DEFLATE: mktext gzips the text and
  strips the gzip container to a raw DEFLATE stream; clectio decompresses it
  with puff, Mark Adler's public-domain reference inflate (~200 lines, verified
  byte-identical to gunzip on the OF/EF text, repetitive, random and empty
  inputs). Text blob 671 KB -&gt; 492 KB (OF), 164 KB -&gt; 132 KB (EF), 2.7x.

- Build with -no-pie: clectio is a local CLI reading static embedded data with
  no attack surface, so it needs no PIE/ASLR. The linker then bakes the string-
  table pointers in at link time instead of emitting ~57 KB of runtime
  relocations.

Net: OF 879 -&gt; 662 KB, EF 266 -&gt; 214 KB. Verified byte-identical to lectio.
The default build still needs only a compiler + libc; a CORPUS= rebuild now
also needs gzip. lz.h removed.

Claude-Session: https://claude.ai/code/session_01S1CD1u3tgSS4xNu6WHfp5a
</content>
</entry>
</feed>
