1 /* 2 * compress.h -- part of src/mod/compress.mod 3 * header file for the zlib compression module 4 */ 5 /* 6 * Copyright (C) 2000 - 2021 Eggheads Development Team 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 */ 22 23 #ifndef _EGG_MOD_COMPRESS_COMPRESS_H 24 #define _EGG_MOD_COMPRESS_COMPRESS_H 25 26 #define UFF_COMPRESS 0x000008 /* Compress the user file */ 27 28 typedef enum { 29 COMPF_ERROR, /* Compression failed. */ 30 COMPF_SUCCESS /* Compression succeeded. */ 31 } compf_result; 32 33 typedef enum { 34 COMPF_UNCOMPRESSED, /* File is uncompressed. */ 35 COMPF_COMPRESSED, /* File is compressed. */ 36 COMPF_FAILED /* Could not determine file type. */ 37 } compf_type; 38 39 40 #ifndef MAKING_COMPRESS 41 /* 4 - 7 */ 42 # define compress_to_file ((int (*)(char *, char *, int))(compress_funcs[4])) 43 # define compress_file ((int (*)(char *, int))(compress_funcs[5])) 44 # define uncompress_to_file ((int (*)(char *, char *))(uncompress_funcs[6])) 45 # define uncompress_file ((int (*)(char *))(uncompress_funcs[7])) 46 /* 8 - 11 */ 47 # define is_compressedfile ((int (*)(char *))(uncompress_funcs[8])) 48 #endif /* !MAKING_COMPRESS */ 49 50 #endif /* !_EGG_MOD_COMPRESS_COMPRESS_H */ 51