创建GZIP存档
// This program is free software: you can redistribute it and/or modify it //package com.nowjava;/* 来自 N o w J a v a . c o m - 时代Java*/ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream; public class Main { public static void createArchive(String outputFilename, String inputFile) throws IOException { GZIPOutputStream out = new GZIPOutputStream(new FileOutputStream( outputFilename)); byte[] buf = new byte[1024]; File file = new File(inputFile); FileInputStream in = new FileInputStream(file);/** from n o w j