да я смотрю:angry_troll wrote:depack_getbyte() vs depack_getbits()
и далее сам цикл распаковки
Code: Select all
        while( (!stop) && success )
        {
                bits = depack_getbits(1,DEPACK_GETBITS_NEXT);
                if( 1&bits ) // %1<byte>
                {
                        byte = depack_getbyte(DEPACK_GETBYTE_NEXT);
Code: Select all
// rewind - to the beginning of input stream, byte - next byte
// returns 0xFFFFFFFF if error (exhausted stream), otherwise byte (0..255)
ULONG depack_getbyte(ULONG operation)
{
        static ULONG position;
 ........................
        else if( operation==DEPACK_GETBYTE_NEXT )
        {
                if( position < wrk.inlen )
                {
                        return (ULONG)wrk.indata[position++];
                }
        }
 
				


