private static ArrayList<int[]> readOrWriteNextRLE(RunLengthEncoding rle)
			throws IOException, ClassNotFoundException {
		if (WRITE_MODE) {
			encodeRLE(rle, os);
			return rleToList(rle);
		} else {
			return decodeRLE(is);
		}
	}