title: How to encode 3 integers into 2 integers?
body: <p>I have three integers <code>(x1,x2,x3)</code> all in <code>[0,255]</code>. I need to encode them into two integers (<code>a</code>, and <code>b</code>) such that I can deterministically decode them back. The constraint is that the size of the new integers needs to be small.
  So I can do <code>a=256*x1+x2</code>, but this makes <code>a</code> much larger than <code>xi</code>.</p>
  <p>Any way to encode integers such that the resulting numbers stay small?
  I am not defining what small is, as I want as small as possible.</p>
  <p>A similar problem is to encode these <code>3</code> numbers into just <code>1</code>. Again the new integer needs to be as small as possible. Any way to do this?</p>