[3745] | 1 | /**************************************************************************
|
---|
| 2 | *
|
---|
| 3 | * comp_dict.h -- Functions for loading the compression dictionary
|
---|
| 4 | * Copyright (C) 1994 Neil Sharman
|
---|
| 5 | *
|
---|
| 6 | * This program is free software; you can redistribute it and/or modify
|
---|
| 7 | * it under the terms of the GNU General Public License as published by
|
---|
| 8 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 9 | * (at your option) any later version.
|
---|
| 10 | *
|
---|
| 11 | * This program is distributed in the hope that it will be useful,
|
---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 14 | * GNU General Public License for more details.
|
---|
| 15 | *
|
---|
| 16 | * You should have received a copy of the GNU General Public License
|
---|
| 17 | * along with this program; if not, write to the Free Software
|
---|
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 19 | *
|
---|
| 20 | * $Id: comp_dict.h 3745 2003-02-20 21:20:24Z mdewsnip $
|
---|
| 21 | *
|
---|
| 22 | **************************************************************************/
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | #define HASH_RATIO 2
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | typedef struct dict_hash_table
|
---|
| 33 | {
|
---|
| 34 | u_long size;
|
---|
| 35 | huff_data *hd;
|
---|
| 36 | u_long *codes;
|
---|
| 37 | u_char **words;
|
---|
| 38 | u_char **table[1];
|
---|
| 39 | }
|
---|
| 40 | dict_hash_table;
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | extern compression_dict_header cdh;
|
---|
| 46 | extern compressed_text_header cth;
|
---|
| 47 | extern comp_frags_header cfh[2];
|
---|
| 48 |
|
---|
| 49 | extern dict_hash_table *ht[2];
|
---|
| 50 |
|
---|
| 51 | extern huff_data char_huff[2];
|
---|
| 52 | extern huff_data lens_huff[2];
|
---|
| 53 | extern u_long *char_codes[2], *lens_codes[2];
|
---|
| 54 | extern u_long Words_disk;
|
---|
| 55 | extern u_long Chars_disk;
|
---|
| 56 |
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | int LoadCompressionDictionary (char *dict_file_name);
|
---|