00001 /* 00002 * compress.h -- 00003 * 00004 * header file for the zlib compression module 00005 */ 00006 /* 00007 * Copyright (C) 2000, 2001, 2002, 2003, 2004 Eggheads Development Team 00008 * 00009 * This program is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * as published by the Free Software Foundation; either version 2 00012 * of the License, or (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 /* 00024 * $Id: compress.h,v 1.5 2003-12-11 00:49:10 wcc Exp $ 00025 */ 00026 00027 #ifndef _EGG_MOD_COMPRESS_COMPRESS_H 00028 #define _EGG_MOD_COMPRESS_COMPRESS_H 00029 00030 #define UFF_COMPRESS 0x000008 /* Compress the user file */ 00031 00032 typedef enum { 00033 COMPF_ERROR, /* Compression failed. */ 00034 COMPF_SUCCESS /* Compression succeeded. */ 00035 } compf_result; 00036 00037 typedef enum { 00038 COMPF_UNCOMPRESSED, /* File is uncompressed. */ 00039 COMPF_COMPRESSED, /* File is compressed. */ 00040 COMPF_FAILED /* Could not determine file type. */ 00041 } compf_type; 00042 00043 00044 #ifndef MAKING_COMPRESS 00045 /* 4 - 7 */ 00046 # define compress_to_file ((int (*)(char *, char *, int))(compress_funcs[4])) 00047 # define compress_file ((int (*)(char *, int))(compress_funcs[5])) 00048 # define uncompress_to_file ((int (*)(char *, char *))(uncompress_funcs[6])) 00049 # define uncompress_file ((int (*)(char *))(uncompress_funcs[7])) 00050 /* 8 - 11 */ 00051 # define is_compressedfile ((int (*)(char *))(uncompress_funcs[8])) 00052 #endif /* !MAKING_COMPRESS */ 00053 00054 #endif /* !_EGG_MOD_COMPRESS_COMPRESS_H */