/* * extract-gzip.c * * Simple usage: Pass filenames as arguments to the program. * It will scan through them, looking for the gzip magic. If * found, it will extract the gzipped file to either the filename * provided in the gzip header, or if that doesn't exist, it will * save it to a file named after the offset where it was found. * * Created by Steve White on Fri Nov 15 2002 * Updated by Steve White on Wed Feb 05 2003 * * Copyright (c) 2002-2003 Steve White. All rights reserved. * */ #include #include static void usage(char *progname); void extractgzip(int input); int main(int argc, char *argv[]) { int input; int i=0; if (argc < 2) { usage(argv[0]); exit(1); } for (i=1; i