()
| 11 | private static final int R = 256; |
| 12 | |
| 13 | private static char[] init() { |
| 14 | char[] a = new char[R]; |
| 15 | for (char i = 0; i < R; i++) a[i] = i; |
| 16 | return a; |
| 17 | } |
| 18 | |
| 19 | // apply move-to-front encoding, reading from standard input and writing to standard output |
| 20 | public static void encode() { |