patch #7308
[mldonkey.git] / src / networks / direct_connect / che3_c.h
blobde3a8640ad5790e07abe172e9be8120caa0012ee
1 /* rewrite in C and caml stubs by b8_bavard (2002) */
2 /* rewrite to class without glib by Mathias Küster (2002) */
4 /* DCTC - a Direct Connect text clone for Linux
5 * Copyright (C) 2001 Eric Prevoteau
7 * he3.c: Copyright (C) Eric Prevoteau <www@ac2i.tzo.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef __HE3_H__
25 #define __HE3_H__
27 typedef struct hufnode
29 unsigned long occur;
30 struct hufnode *left,*right; /* son nodes (left and right are both either not null or either null) */
31 unsigned char val; /* if left&right!=NULL, val is the encoded character, else, it has no usage */
32 } HUFNODE;
34 typedef struct
36 unsigned int bits_len; /* number of bits in the bitfield used to encode the value */
37 unsigned long bits; /* bitfield containing the encoding pattern */
38 /* a N bits_len pattern is stored inside bits from bit N-1 to bit 0 */
39 } HUFENCODE;
41 #endif