blurhash
blurhash copied to clipboard
Add a pure Ruby implementation
Hi,
I ported the C implementation to pure Ruby (the code is not pretty since it's pretty much a straight port from the C code). I don't know how fast this is compared to the C implementation. I did this because I think it would make a good JIT benchmark, especially since we can compare against the C implementation.
The commit doesn't replace the existing C implementation, it just adds an encode_rb function. I don't expect this PR to be merged necessarily, I just wanted to send it and say "hey, there's a pure Ruby version if you want it! 😄"
@Gargron Friendly ping 😄