@Override
	public void run() {
		int size = 1024;
		GZIPOutputStream gzipOutputStream = null;
		try {
			gzipOutputStream = new GZIPOutputStream(this.output, size);
		} catch (IOException e1) {
			System.err.println("\t\t\tFileCompress:IOException occurred while instantiating the GZIPOutputStream.");
			this.finished = true;
			return;
		}
		int len;
		byte[] buff = new byte[size];
		while (!finished && !suspending) {
			try {
				len = input.read(buff);
				if (len > 0) {
					gzipOutputStream.write(buff, 0, len);
				} else {
					this.finished = true;
				}
			} catch (IOException e) {
				//TODO
				e.printStackTrace();
				this.finished = true;
				break;
			}
			if (this.sleepSlot == 0) {
				continue;
			}
			try {
				Thread.sleep(this.sleepSlot);
			} catch (InterruptedException e) {
				//TODO:
				e.printStackTrace();
				this.finished = true;
				break;
			}
		}
		try {
			if (this.finished) {
				input.close();
				output.close();
			}
			gzipOutputStream.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		this.suspending = false;
		return;
		
	}