1 /***********************************************************
3 ***********************************************************/
6 static int j; /* remaining bytes to copy */
8 extern struct lha_opts opts;
13 huf_decode_start(opts.method);
18 decode(uint count, uchar buffer[])
19 /* The calling function must keep the number of
20 bytes to be processed. This function decodes
21 either 'count' bytes or 'DICSIZ' bytes, whichever
22 is smaller, into the array 'buffer[]' of size
24 Call decode_start() once for each new file
25 before calling this function. */
32 buffer[r] = buffer[i];
33 i = (i + 1) & (MAXDICSIZ - 1);
45 j = c - (UCHAR_MAX + 1 - THRESHOLD);
46 i = (r - decode_p() - 1) & (MAXDICSIZ - 1);
48 buffer[r] = buffer[i];
49 i = (i + 1) & (MAXDICSIZ - 1);