Nibnib was developed as an experimental solution to a specific hardware constraint: displaying images on microcontrollers like the RP2350. On such devices, the processing budget is extremely tight—approximately six cycles per pixel. This budget is barely enough to perform a pixel fetch, a palette lookup, and a store into a line buffer, leaving very little room for complex decompression logic. To meet this requirement, Nibnib prioritizes a deterministic and straightforward decoding process over encoding complexity.
The format achieves a 4bpp (bits per pixel) compression rate by decoding two pixels simultaneously from a single byte of input. Unlike standard palette images that store absolute colors, Nibnib uses a palette of color deltas. This approach significantly improves the quality of "soft" regions in an image. The decoding mechanism works by taking a delta value from the palette and adding it to a doubled-up version of the previous decoded pixel. This operation yields two 16bpp (RGB 565 format) pixels, where the low 16 bits represent the left pixel. Because the decoding is a simple addition and bit-shift operation, it can be executed with the extreme speed required for real-time display on constrained hardware.

The diagram explains the specific decoding mechanism where a delta value is added to a doubled-up version of the previous pixel.
This high decompression speed comes at the cost of a highly asymmetrical encoding process. While decoding is nearly instantaneous, the encoder must perform a complex search through the space of possible encoded images to find a high-quality replica of the original. This search involves choosing both the optimal palette and the best codewords, making the encoder orders of magnitude slower than the decoder. Currently, the greedy search algorithm can result in artifacts trailing to the right of sharp edges. Furthermore, the palette is not yet adaptively chosen based on the specific input image, representing a primary area for future quality improvements. While the format is not intended for long-term archival, it is designed to be integrated tightly with the decoder for high-performance, low-power visual output.

This image illustrates the current limitations of the greedy search algorithm mentioned in the third paragraph.

This image serves as a comparison to the artifact-heavy version, showing the potential of the format's encoding process.