Encoding Information Into A Single Byte In TypeScript