1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Replace PuTTY's 2-3-4 tree implementation with the shiny new counted

one, in preparation for using it to speed up scrollback.

[originally from svn r1053]
This commit is contained in:
Simon Tatham
2001-04-16 17:18:24 +00:00
parent cdf972d9f1
commit 03c9b6107b
7 changed files with 862 additions and 320 deletions

View File

@ -95,12 +95,12 @@ static void lz77_compress(struct LZ77Context *ctx,
#define INVALID -1 /* invalid hash _and_ invalid offset */
struct WindowEntry {
int next, prev; /* array indices within the window */
int hashval;
short next, prev; /* array indices within the window */
short hashval;
};
struct HashEntry {
int first; /* window index of first in chain */
short first; /* window index of first in chain */
};
struct Match {
@ -393,7 +393,8 @@ static const unsigned char mirrorbytes[256] = {
};
typedef struct {
int code, extrabits, min, max;
short code, extrabits;
int min, max;
} coderecord;
static const coderecord lencodes[] = {
@ -760,7 +761,7 @@ struct zlib_tableentry;
struct zlib_tableentry {
unsigned char nbits;
int code;
short code;
struct zlib_table *nexttable;
};