public void add(byte c, int pos) { this.mStackPos--; int index = this.mStack[this.mStackPos]; Compression.Node node = this.mNodes[index]; Compression.Node node2 = this.mNodes[0x800 + c]; node.mNext = node2.mNext; node.mPrev = 0x800 + c; node.mPos = pos; this.mNodes[node2.mNext].mPrev = index; node2.mNext = index; }
public void remove(byte c, int pos) { int mPrev = this.mNodes[0x800 + c].mPrev; Compression.Node node = this.mNodes[mPrev]; if (node.mPos != pos) { Debug.LogError("n.mPos != pos"); } this.mStack[this.mStackPos] = this.mNodes[node.mPrev].mNext; this.mStackPos++; this.mNodes[node.mPrev].mNext = node.mNext; this.mNodes[node.mNext].mPrev = node.mPrev; }