Oriel — AI & technology worth noticing, every day.

Nibnib: Image compression with extreme decompression speed

Repository · https://github.com/raphlinus/nibnib

First seen by Oriel on .

AI summary

nibnib is an RGB 565 image format designed for extreme decompression speed on constrained devices, decoding two pixels per input byte through palette-based deltas.

  • The decoder duplicates the previous pixel, adds a 32-bit palette delta selected by the next input byte, and emits two 16-bit pixels.
  • The format targets approximately 6 cycles per pixel on an RP2350, leaving enough budget for pixel fetch, palette lookup, and line-buffer storage.
  • Encoding uses Floyd-Steinberg error diffusion and evaluates all 256 palette entries for each pixel pair, making it orders of magnitude slower than decoding.
  • The current palette combines small delta values in a cube with weighted-Gaussian random values, but is not selected adaptively per image.
  • Files contain width and height, 256 32-bit palette entries, and rows with two initial RGB 565 pixels followed by palette-indexed bytes; metadata is absent.

#image compression #rgb 565 #rp2350 #error diffusion

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Points

Score reported by the source.

  • Hacker News: 186, latest observation ; +177 over observed period since

Comments

Comment count reported by the source.

  • Hacker News: 32, latest observation ; +32 over observed period since

Aliases

SourceExternal IDURL
Hacker News50299811https://github.com/raphlinus/nibnib Read discussion