Hacker News new | ask | show | jobs
by louisstow 1647 days ago
Can someone explain how it's lossless if there's a chance of hash collisions in the index?
2 comments

The encoder can always generate the code for a literal pixel if the required colour is not found in the index.
TLDR is hash collisions are an explicit part of the format. Encode and Decode are both specified to use the same hash function, so the hash collisions will all cancel out.