[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: DEFLATE, ZLIB and RFC1951




> From: Joern Sierwald
>
> ZLIB _does_ produce these. And when single stepping through the
> inflate_blocks() routine, it certainly interprets them
> correcty.
>
>       NEEDBITS(3)
>       t = (uInt)b & 7;
>       s->last = t & 1;
>       switch (t >> 1)
>       {
>         case 0:                         /* stored */
>           [cut]
>         case 1:                         /* fixed */
>           [cut]
>         case 2:                         /* dynamic */
>           [cut]
>         case 3:                         /* illegal */
>           [cut]
> 	}
>
> s->last is your BFINAL and t >> 1 is BTYPE.
>
> Jörn
>

Ah, thank you!

I was looking at the most-significant bits of the first byte instead of the
least-significant.  Silly me :-(

Regards,
Paul(o)



References: