Hacker News new | ask | show | jobs
by aidenn0 1524 days ago
gzip compressed (binary) pbm is only 56 bytes; 32 bytes for zstd compressed data. PBMs have a very simple header and no footer, so the file is almost entirely all zeroes.
1 comments

Web browsers do not support pbm, last time I checked. On the other hand, the JPEG-XL rollout is well underway (e.g. Chrome supports it behind a feature flag).

The image is only 22 bytes as a jxl:

https://cdn.discordapp.com/attachments/286612533757083648/96...

base64 data uri version:

  data:image/jxl;base64,/wp/QCQIBgEALABLOEmIDIPCakgSBg==
Most browser do support gzip though. Sort-of transparently on the connection level.

So instead of optimizing the size of your file directly, you could optimize the size of what's actually send over the connection.

I wonder if that would give you a slightly different png or bmp or so?