#include "ipxtunnel.h"
#include "misc.h"

#define LEN 1000

unsigned char ibuf[LEN];
unsigned char obuf[LEN];
unsigned char iibuf[LEN];

int
main(int argc, char **argv)
{
	int ch, len = 0, i;

	while((ch = getchar()) != EOF)
		ibuf[len++] = (unsigned char) ch;

	printf("Given Input %d bytes:\n", len);
	for(i = 0; i < len; i++)
		printf("%02x ", ibuf[i] & 0xff);
	putchar('\n');

	len = Compress(ibuf, obuf, len);
	printf("Compress: %d\n", len);
	for(i = 0; i < len; i++)
		printf("%02x ", obuf[i] & 0xff);
	putchar('\n');

	len = Uncompress(obuf, iibuf, len);
	printf("Uncompress: %d\n", len);
	for(i = 0; i < len; i++)
		printf("%02x ", iibuf[i] & 0xff);
	putchar('\n');

	return 0;
}
