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