Approved by: krion@
based on Daniel Steven Smith encoding system. PR: ports/79396 Submitted by: Andrew <obscure9@gmail.com> Approved by: clement (mentor)