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