news.volyx.in

QOI: Lossless Image Compression in O(n) Time (phoboslab.org)

1057 points by Ragnarork · 1761 days ago · 293 comments on HN

Article summary

The article introduces QOI, a new lossless image compression format that offers a 20x-50x speedup in compression and 3x-4x speedup in decompression compared to PNG. QOI achieves this by using a simple compression scheme that encodes and decodes images in a single pass. The format is designed to be fast and efficient, with a focus on simplicity rather than maximum compression ratio. The author notes that QOI is not intended to replace PNG, but rather to provide a faster and more efficient alternative for certain use cases.

Main themes

  • image compression
  • QOI format
  • SIMD acceleration
  • locality-preserving pixel order
  • compression ratio vs speed
  • lossless compression
  • alternative compression formats

What commenters say

  • SIMD acceleration may not be beneficial for QOI due to its variable-length instructions and delta encoding.
  • QOI's compression ratio is not as good as some other formats like FLIF, but its speed and simplicity make it a viable alternative.
  • Using a locality-preserving pixel order, such as a Z-curve or Hilbert curve, could improve QOI's compression ratio.
  • The use of a hash function to determine the lookup position in the color index array may not be the most effective approach, and alternative methods could be explored.
  • QOI's performance is impressive, especially for decoding, and it may be suitable for use cases where speed is more important than maximum compression ratio.
  • The idea of trading compression ratio for speed and simplicity is a valid one, and QOI may be a good example of this approach.
  • Further optimizations and improvements to QOI are possible, such as using different pixel orders or exploring other compression techniques.