| 626 | |
| 627 | |
| 628 | bool Unpack::ReadTables30() |
| 629 | { |
| 630 | byte BitLength[BC]; |
| 631 | byte Table[HUFF_TABLE_SIZE30]; |
| 632 | if (Inp.InAddr>ReadTop-25) |
| 633 | if (!UnpReadBuf30()) |
| 634 | return(false); |
| 635 | Inp.faddbits((8-Inp.InBit)&7); |
| 636 | uint BitField=Inp.fgetbits(); |
| 637 | if (BitField & 0x8000) |
| 638 | { |
| 639 | UnpBlockType=BLOCK_PPM; |
| 640 | return(PPM.DecodeInit(this,PPMEscChar)); |
| 641 | } |
| 642 | UnpBlockType=BLOCK_LZ; |
| 643 | |
| 644 | PrevLowDist=0; |
| 645 | LowDistRepCount=0; |
| 646 | |
| 647 | if (!(BitField & 0x4000)) |
| 648 | memset(UnpOldTable,0,sizeof(UnpOldTable)); |
| 649 | Inp.faddbits(2); |
| 650 | |
| 651 | for (uint I=0;I<BC;I++) |
| 652 | { |
| 653 | uint Length=(byte)(Inp.fgetbits() >> 12); |
| 654 | Inp.faddbits(4); |
| 655 | if (Length==15) |
| 656 | { |
| 657 | uint ZeroCount=(byte)(Inp.fgetbits() >> 12); |
| 658 | Inp.faddbits(4); |
| 659 | if (ZeroCount==0) |
| 660 | BitLength[I]=15; |
| 661 | else |
| 662 | { |
| 663 | ZeroCount+=2; |
| 664 | while (ZeroCount-- > 0 && I<ASIZE(BitLength)) |
| 665 | BitLength[I++]=0; |
| 666 | I--; |
| 667 | } |
| 668 | } |
| 669 | else |
| 670 | BitLength[I]=Length; |
| 671 | } |
| 672 | MakeDecodeTables(BitLength,&BlockTables.BD,BC30); |
| 673 | |
| 674 | const uint TableSize=HUFF_TABLE_SIZE30; |
| 675 | for (uint I=0;I<TableSize;) |
| 676 | { |
| 677 | if (Inp.InAddr>ReadTop-5) |
| 678 | if (!UnpReadBuf30()) |
| 679 | return(false); |
| 680 | uint Number=DecodeNumber(Inp,&BlockTables.BD); |
| 681 | if (Number<16) |
| 682 | { |
| 683 | Table[I]=(Number+UnpOldTable[I]) & 0xf; |
| 684 | I++; |
| 685 | } |
nothing calls this directly
no test coverage detected