xref: /inferno-os/module/inflate.m (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
1Inflate: module
2{
3	PATH:	con "/dis/lib/inflate.dis";
4
5	InflateBlock:	con 16r8000;
6	InflateMask:	con 16rf0000;
7
8	InflateEmptyIn,
9	InflateFlushOut,
10	InflateAck,
11	InflateDone,
12	InflateError:	con iota + (1 << 16) + 1;
13
14	# conduit for data streaming between inflate and its producer/consumer
15	InflateIO: adt
16	{
17		ibuf: array of byte;	# input buffer [InflateBlock]
18		obuf: array of byte;	# output buffer [InflateBlock]
19		c: chan of int;	# for inflate <-> server comm.
20	};
21
22	init: fn();
23	reset: fn(): ref InflateIO;
24	inflate: fn();
25};
26