2021.08.29 21:25:00 (1432061744277426183) from Daniel J. Bernstein, replying to "Adam Langley (@agl__)" (1431297741674586112):
There's a better encoder presented (in Python) on page 18 of https://ntruprime.cr.yp.to/nist/ntruprime-20201007.pdf. Stays inside int32, space-efficient, simple. Further advantages if you're also thinking about other applications: scales well to very long sequences, with easy parallelization and vectorization.
2021.08.27 18:49:08 (1431297741674586112) from "Adam Langley (@agl__)":
Efficient QR encoding: https://www.imperialviolet.org/2021/08/26/qrencoding.html