internal int createChild(ModelPPM model, State pStats, StateRef firstState) { PPMContext pc = getTempPPMContext(model.SubAlloc.Heap); pc.Address = model.SubAlloc.allocContext(); if (pc != null) { pc.NumStats = 1; pc.setOneState(firstState); pc.setSuffix(this); pStats.SetSuccessor(pc); } return(pc.Address); }
internal int createChild(ModelPPM model, SharpCompress.Compressor.PPMd.H.State pStats, StateRef firstState) { PPMContext successor = this.getTempPPMContext(model.SubAlloc.Heap); successor.Address = model.SubAlloc.allocContext(); if (successor != null) { successor.NumStats = 1; successor.setOneState(firstState); successor.setSuffix(this); pStats.SetSuccessor(successor); } return(successor.Address); }
private void restartModelRare() { Utility.Fill(charMask, 0); subAlloc.initSubAllocator(); initRL = -(maxOrder < 12 ? maxOrder : 12) - 1; int addr = subAlloc.allocContext(); minContext.Address = addr; maxContext.Address = addr; minContext.setSuffix(0); orderFall = maxOrder; minContext.NumStats = 256; minContext.FreqData.SummFreq = minContext.NumStats + 1; addr = subAlloc.allocUnits(256 / 2); foundState.Address = addr; minContext.FreqData.SetStats(addr); State state = new State(subAlloc.Heap); addr = minContext.FreqData.GetStats(); runLength = initRL; prevSuccess = 0; for (int i = 0; i < 256; i++) { state.Address = addr + i * State.Size; state.Symbol = i; state.Freq = 1; state.SetSuccessor(0); } for (int i = 0; i < 128; i++) { for (int k = 0; k < 8; k++) { for (int m = 0; m < 64; m += 8) { binSumm[i][k + m] = BIN_SCALE - InitBinEsc[k] / (i + 2); } } } for (int i = 0; i < 25; i++) { for (int k = 0; k < 16; k++) { SEE2Cont[i][k].Initialize(5 * i + 10); } } }