Lzh.h
资源名称:bo2ksrc.zip [点击查看]
上传用户:jinandeyu
上传日期:2007-01-05
资源大小:620k
文件大小:3k
源码类别:
远程控制编程
开发平台:
WINDOWS
- /* Back Orifice 2000 - Remote Administration Suite
- Copyright (C) 1999, Cult Of The Dead Cow
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- The author of this program may be contacted at dildog@l0pht.com. */
- #ifndef LZH_H
- #define LZH_H
- #define far
- typedef unsigned char uchar; /* 8 bits or more */
- typedef unsigned int uint; /* 16 bits or more */
- typedef unsigned short ushort; /* 16 bits or more */
- typedef unsigned long ulong; /* 32 bits or more */
- #ifndef CHAR_BIT
- #define CHAR_BIT 8
- #endif
- #ifndef UCHAR_MAX
- #define UCHAR_MAX 255
- #endif
- #define BITBUFTYPE ushort
- #define BITBUFSIZ (CHAR_BIT * sizeof (BITBUFTYPE))
- #define DICBIT 13 /* 12(-lh4-) or 13(-lh5-) */
- #define DICSIZ (1U << DICBIT)
- #define MAXMATCH 256 /* formerly F (not more than UCHAR_MAX + 1) */
- #define THRESHOLD 3 /* choose optimal value */
- #define NC (UCHAR_MAX + MAXMATCH + 2 - THRESHOLD) /* alphabet = {0, 1, 2, ..., NC - 1} */
- #define CBIT 9 /* $lfloor log_2 NC rfloor + 1$ */
- #define CODE_BIT 16 /* codeword length */
- #define MAX_HASH_VAL (3 * DICSIZ + (DICSIZ / 512 + 1) * UCHAR_MAX)
- typedef void far * void_far_pointer;
- typedef int (*type_fnc_read) (void far *data, int n);
- typedef int (*type_fnc_write) (void far *data, int n);
- typedef void_far_pointer (*type_fnc_malloc) (unsigned n);
- typedef void (*type_fnc_free) (void far *p);
- int lzh_freeze (type_fnc_read pfnc_read,
- type_fnc_write pfnc_write,
- type_fnc_malloc pfnc_malloc,
- type_fnc_free pfnc_free);
- int lzh_melt (type_fnc_read pfnc_read,
- type_fnc_write pfnc_write,
- type_fnc_malloc pfnc_malloc,
- type_fnc_free pfnc_free,
- ulong origsize);
- #endif /* ifndef LZH_H */