Skip to content

Select the most efficient QR encoding mode rather than always using 8bit

Volker Krause requested to merge work/fix-qr-encoding-mode-selection into master

Depending on the content QR can use different encoding modes which can be a lot more efficient than using the universal 8bit mode we were using unconditionally so far.

For the Base45 encoded EU DGC vaccination certificates this makes the codes we generate about 20-30% larger than needed which is noticeable but still manageable. For the SHC vaccination certificates which are encoded in about 1500 digits this completely degenerates into unscannably large codes though.

With this change we use libqrencode's built-in functionality to select the best encoding automatically.

Merge request reports