Lines Matching refs:Sd
96 IN SCRATCH_DATA *Sd,
107 Sd - The global scratch data
114 Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
116 while (NumOfBits > Sd->mBitCount) {
118 Sd->mBitBuf |= (UINT32) (Sd->mSubBitBuf << (NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount)));
120 if (Sd->mCompSize > 0) {
124 Sd->mCompSize--;
125 Sd->mSubBitBuf = 0;
126 Sd->mSubBitBuf = Sd->mSrcBase[Sd->mInBuf++];
127 Sd->mBitCount = 8;
133 Sd->mSubBitBuf = 0;
134 Sd->mBitCount = 8;
139 Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits);
140 Sd->mBitBuf |= Sd->mSubBitBuf >> Sd->mBitCount;
146 IN SCRATCH_DATA *Sd,
159 Sd - The global scratch data.
170 OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits));
172 FillBuf (Sd, NumOfBits);
180 IN SCRATCH_DATA *Sd,
194 Sd - The global scratch data
286 Sd->mRight[Avail] = Sd->mLeft[Avail] = 0;
291 Pointer = &Sd->mRight[*Pointer];
293 Pointer = &Sd->mLeft[*Pointer];
315 IN SCRATCH_DATA *Sd
325 Sd - the global scratch data
337 Val = Sd->mPTTable[Sd->mBitBuf >> (BITBUFSIZ - 8)];
344 if (Sd->mBitBuf & Mask) {
345 Val = Sd->mRight[Val];
347 Val = Sd->mLeft[Val];
356 FillBuf (Sd, Sd->mPTLen[Val]);
360 Pos = (UINT32) ((1U << (Val - 1)) + GetBits (Sd, (UINT16) (Val - 1)));
369 IN SCRATCH_DATA *Sd,
382 Sd - The global scratch data
399 Number = (UINT16) GetBits (Sd, nbit);
402 CharC = (UINT16) GetBits (Sd, nbit);
405 Sd->mPTTable[Index] = CharC;
409 Sd->mPTLen[Index] = 0;
419 CharC = (UINT16) (Sd->mBitBuf >> (BITBUFSIZ - 3));
423 while (Mask & Sd->mBitBuf) {
429 FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3));
431 Sd->mPTLen[Index++] = (UINT8) CharC;
434 CharC = (UINT16) GetBits (Sd, 2);
436 Sd->mPTLen[Index++] = 0;
442 Sd->mPTLen[Index++] = 0;
445 return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
451 SCRATCH_DATA *Sd
461 Sd - the global scratch data
472 Number = (UINT16) GetBits (Sd, CBIT);
475 CharC = (UINT16) GetBits (Sd, CBIT);
478 Sd->mCLen[Index] = 0;
482 Sd->mCTable[Index] = CharC;
491 CharC = Sd->mPTTable[Sd->mBitBuf >> (BITBUFSIZ - 8)];
497 if (Mask & Sd->mBitBuf) {
498 CharC = Sd->mRight[CharC];
500 CharC = Sd->mLeft[CharC];
510 FillBuf (Sd, Sd->mPTLen[CharC]);
517 CharC = (UINT16) (GetBits (Sd, 4) + 3);
519 CharC = (UINT16) (GetBits (Sd, CBIT) + 20);
523 Sd->mCLen[Index++] = 0;
528 Sd->mCLen[Index++] = (UINT8) (CharC - 2);
534 Sd->mCLen[Index++] = 0;
537 MakeTable (Sd, NC, Sd->mCLen, 12, Sd->mCTable);
545 SCRATCH_DATA *Sd
555 Sd - The global scratch data.
566 if (Sd->mBlockSize == 0) {
570 Sd->mBlockSize = (UINT16) GetBits (Sd, 16);
571 Sd->mBadTableFlag = ReadPTLen (Sd, NT, TBIT, 3);
572 if (Sd->mBadTableFlag != 0) {
576 ReadCLen (Sd);
578 Sd->mBadTableFlag = ReadPTLen (Sd, MAXNP, Sd->mPBit, (UINT16) (-1));
579 if (Sd->mBadTableFlag != 0) {
584 Sd->mBlockSize--;
585 Index2 = Sd->mCTable[Sd->mBitBuf >> (BITBUFSIZ - 12)];
591 if (Sd->mBitBuf & Mask) {
592 Index2 = Sd->mRight[Index2];
594 Index2 = Sd->mLeft[Index2];
603 FillBuf (Sd, Sd->mCLen[Index2]);
611 SCRATCH_DATA *Sd
621 Sd - The global scratch data
636 CharC = DecodeC (Sd);
637 if (Sd->mBadTableFlag != 0) {
645 if (Sd->mOutBuf >= Sd->mOrigSize) {
648 Sd->mDstBase[Sd->mOutBuf++] = (UINT8) CharC;
659 DataIdx = Sd->mOutBuf - DecodeP (Sd) - 1;
663 Sd->mDstBase[Sd->mOutBuf++] = Sd->mDstBase[DataIdx++];
664 if (Sd->mOutBuf >= Sd->mOrigSize) {
755 SCRATCH_DATA *Sd;
767 Sd = (SCRATCH_DATA *) Scratch;
794 ((UINT8 *) Sd)[Index] = 0;
803 Sd->mPBit = 4;
807 Sd->mPBit = 5;
817 Sd->mSrcBase = Src;
818 Sd->mDstBase = Dst;
819 Sd->mCompSize = CompSize;
820 Sd->mOrigSize = OrigSize;
825 FillBuf (Sd, BITBUFSIZ);
830 Decode (Sd);
832 if (Sd->mBadTableFlag != 0) {