taoensso / nippy

The fastest serialization library for Clojure
https://www.taoensso.com/nippy
Eclipse Public License 1.0
1.04k stars 60 forks source link

A question about extend-freeze #174

Closed RokLenarcic closed 2 months ago

RokLenarcic commented 2 months ago

I see that the custom-type-id is hashed to 2 bytes. What happens if this collides with another extend call?

ptaoussanis commented 2 months ago

Hi Rok,

If extend-freeze is called with 2 keywords that hash to the same id - a compile-time error will be thrown. In that case you'll need to either choose a different kw, or use the non-hashing implementation.