private static void encodeRLE(RunLengthEncoding rle, ObjectOutputStream os)
			throws IOException {
		os.writeInt(rle.getWidth());
		os.writeInt(rle.getHeight());
		ArrayList<int[]> runs = rleToList(rle);
		os.writeInt(runs.size());
		for (int[] run : runs)
			os.writeObject(run);
	}