There is a Ruby port [1] publicly available. From the encoding routine [2], it seems to be an sRGB correction followed by a two-dimensional DCT. The first two bytes encode parameters---the size of the output matrix n x m and the quantization scale used for ACs; next 4 bytes encode the DC, then (nm-1) quantized ACs (2 bytes per AC) follow. The comparison to Facebook's similar solution [3] would be interesting (but I realize that Blurhash tries to <i>hide</i> explicit images, so technically they have different goals).<p>[1] <a href="https://github.com/Gargron/blurhash/" rel="nofollow">https://github.com/Gargron/blurhash/</a><p>[2] <a href="https://github.com/Gargron/blurhash/blob/master/ext/blurhash/encode.c" rel="nofollow">https://github.com/Gargron/blurhash/blob/master/ext/blurhash...</a><p>[3] <a href="https://code.fb.com/android/the-technology-behind-preview-photos/" rel="nofollow">https://code.fb.com/android/the-technology-behind-preview-ph...</a>