public static void encode(StringBuilder sb, int number) {
        encodeUnsigned(sb, Math.abs(number) * 2 + (number >= 0 ? 0 : 1));
    }
@Test
    public void encode() {
        StringBuilder sb = new StringBuilder();
        for (int i = -65536; i <= 65536; ++i) {
            sb.setLength(0);
            Base46.encode(sb, i);
            CharFlow flow = new CharFlow(sb.toString().toCharArray());
            int num = Base46.decode(flow);
            assertEquals(i, num);
        }
    }