| 567 | |
| 568 | |
| 569 | bool ModelPPM::DecodeInit(Unpack *UnpackRead,int &EscChar) |
| 570 | { |
| 571 | int MaxOrder=UnpackRead->GetChar(); |
| 572 | bool Reset=(MaxOrder & 0x20)!=0; |
| 573 | |
| 574 | int MaxMB; |
| 575 | if (Reset) |
| 576 | MaxMB=UnpackRead->GetChar(); |
| 577 | else |
| 578 | if (SubAlloc.GetAllocatedMemory()==0) |
| 579 | return(false); |
| 580 | if (MaxOrder & 0x40) |
| 581 | EscChar=UnpackRead->GetChar(); |
| 582 | Coder.InitDecoder(UnpackRead); |
| 583 | if (Reset) |
| 584 | { |
| 585 | MaxOrder=(MaxOrder & 0x1f)+1; |
| 586 | if (MaxOrder>16) |
| 587 | MaxOrder=16+(MaxOrder-16)*3; |
| 588 | if (MaxOrder==1) |
| 589 | { |
| 590 | SubAlloc.StopSubAllocator(); |
| 591 | return(false); |
| 592 | } |
| 593 | SubAlloc.StartSubAllocator(MaxMB+1); |
| 594 | StartModelRare(MaxOrder); |
| 595 | } |
| 596 | return(MinContext!=NULL); |
| 597 | } |
| 598 | |
| 599 | |
| 600 | int ModelPPM::DecodeChar() |
no test coverage detected