/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1993-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* huffman coding encoding
*
* David Korn
* AT&T Laboratories
*/
#include "huffman.h"
static unsigned char *outend;
static unsigned char *outbuff;
{ \
{ \
return(-1); \
} \
}
/*
* encode <size> bytes of <infile> using <hp> encoding and write
* result to <outfile>
* encode until end-of-file of <size> < 0.
*/
{
register long buffer;
register int left, i, c;
register unsigned char *inbuff;
register int n;
register unsigned char *outp;
{
/* compute the bit patterns for each character */
{
for (c=0; c<=END; c++)
bits[c] = n++;
n >>= 1;
}
}
return(-1);
do
{
{
{
c = END;
goto endof;
}
return(-1);
}
n = size;
while(n-- > 0)
{
c = *inbuff++;
}
goto done;
}
while (c != END);
if(left)
{
buffer = 0;
}
done:
return(-1);
}
{
return(-1);
return(-1);
return(n);
}