I wa recently playing with this pattern in J, where it can be expressed like so
~:"1/~&.#:i.2^8
See it here: https://jsoftware.github.io/j-playground/bin/html2/#base64=b...