1 7a4ee46d 2003-11-23 devnull typedef struct Whack Whack;
2 7a4ee46d 2003-11-23 devnull typedef struct Unwhack Unwhack;
6 7a4ee46d 2003-11-23 devnull WhackStats = 8,
7 7a4ee46d 2003-11-23 devnull WhackErrLen = 64, /* max length of error message from thwack or unthwack */
8 7a4ee46d 2003-11-23 devnull WhackMaxOff = 16*1024, /* max allowed offset */
10 7a4ee46d 2003-11-23 devnull HashLog = 14,
11 7a4ee46d 2003-11-23 devnull HashSize = 1<<HashLog,
12 7a4ee46d 2003-11-23 devnull HashMask = HashSize - 1,
14 7a4ee46d 2003-11-23 devnull MinMatch = 3, /* shortest match possible */
16 7a4ee46d 2003-11-23 devnull MinDecode = 8, /* minimum bits to decode a match or lit; >= 8 */
18 7a4ee46d 2003-11-23 devnull MaxSeqMask = 8, /* number of bits in coding block mask */
19 7a4ee46d 2003-11-23 devnull MaxSeqStart = 256 /* max offset of initial coding block */
22 7a4ee46d 2003-11-23 devnull struct Whack
24 7a4ee46d 2003-11-23 devnull ushort begin; /* time of first byte in hash */
25 7a4ee46d 2003-11-23 devnull ushort hash[HashSize];
26 7a4ee46d 2003-11-23 devnull ushort next[WhackMaxOff];
27 7a4ee46d 2003-11-23 devnull uchar *data;
30 7a4ee46d 2003-11-23 devnull struct Unwhack
32 7a4ee46d 2003-11-23 devnull char err[WhackErrLen];
35 7a4ee46d 2003-11-23 devnull void whackinit(Whack*, int level);
36 7a4ee46d 2003-11-23 devnull void unwhackinit(Unwhack*);
37 7a4ee46d 2003-11-23 devnull int whack(Whack*, uchar *dst, uchar *src, int nsrc, ulong stats[WhackStats]);
38 7a4ee46d 2003-11-23 devnull int unwhack(Unwhack*, uchar *dst, int ndst, uchar *src, int nsrc);
40 7a4ee46d 2003-11-23 devnull int whackblock(uchar *dst, uchar *src, int ssize);