Compile with
grep -vE '#|>' x11.md | xxd -p -r > x11.png
Result visible here
8950 4e47 0d0a 1a0a
0000000D
"IHDR" in ASCII
49484452
00 00 00 04
00000004
01
00
00
00
00
Can be calculated with
echo 'obase=16;' (echo 4948445200000004000000040100000000|xxd -r -p|cksum -o 3|cut -d' ' -f1)|bc
818AA3D3
00000010
"IDAT" in ASCII
49444154
Line by line, 0 for black, 1 for white:
0b1000, 0b0100, 0b0001, 0b0010
Padded lines:0b10000000 0b01000000 0b00010000 0b00100000 = 0x80, 0x40, 0x10, 0x20
Prefix line with None filter,0x00
:0x00, 0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x20
Then apply DEFLATE withruby -rzlib 'puts Zlib.deflate([0x00, 0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x20].pack('C*')).unpack('H*')'
789c63686070601060500000051800f1
FA209263
Nothing there.
00000000
"IEND" in ASCII
49 45 4E 44
AE426082