Urgent.News

What's breaking now, across thousands of outlets.

Tech

Nibnib says 4bpp. The file still has a header.

My tiny nibnib file was larger than the raw RGB image I fed into it. For a 16ร—16 synthetic gradient, the raw RGB pixels took 768 bytes . The nibnib file took 1,220 bytes . Nothing had gone wrong with the encoder. The file had a palette to carry. ๐Ÿ“ฆ That was the useful surprise in trying Raph Levien's image format: โ€œ4 bits per pixelโ€ describes the compact pixel coding, not an all-inclusive promiseโ€ฆ

My tiny nibnib file was larger than the raw RGB image I fed into it. The file had a palette to carry, despite the "4 bits per pixel" description. I created three original RGB gradients and ran the upstream nibnib encoder and decoder, checking the decoded pixels with an independent reader. Nibnib aims at constrained-device decoding and works on pixel pairs, using a palette of differences rather than absolute colors.

When I checked file layout and round trips, the nibnib file size for a 16ร—16 synthetic gradient was 1,220 bytes, while the raw RGB pixels took 768 bytes. The file stored dimensions and a fixed palette before its row data, with each row starting with an explicit pixel pair and later pairs using palette indices. The rows were aligned to four-byte boundaries.

The file size calculation for positive, even widths was provided, and the checked sizes across three fixtures were compared to uncompressed RGB. The demonstration used nibnib version 0.1.0, and the independent reader followed the documented layout and checked decoder source.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Europe hit by another wave of grocery store freezer hacks

The new incidents come weeks after a cyberattack on fridges and freezers in France that forced supermarkets to throw away food.

  • Europe faces second wave of grocery store freezer hacks.
  • Swedish ICA and Coop report cooling issues at multiple stores.
  • Belgian Delhaize confirms IT incident affecting refrigeration systems.

My parser read past the input. AddressSanitizer stayed quiet.

I gave a deliberately broken parser three bytes. It read byte four. AddressSanitizer said nothing. Then I changed the allocation around the input.

  • Parser read beyond input's fourth byte
  • AddressSanitizer failed to detect error
  • Fix involves allocating space for zero

Two Truths and a Lie: Developer Edition.

We all know the classic icebreaker: three statements, two true, one a lie. Today we're playing it with a developer twist. Below are three rounds.

  • Two statements are true, one is a lie
  • Topics include programming origins and tech history
  • Participants share personal developer experiences

More from Monday 2 November โ†’