public override void ToBBuffer(BBuffer bb) { bb.Reserve(bb.dataLen + 58 * 4); var nexts = new int[2]; nexts[0] = inext; nexts[1] = inextp; Buffer.BlockCopy(nexts, 0, bb.buf, bb.dataLen, 8); Buffer.BlockCopy(SeedArray, 0, bb.buf, bb.dataLen + 8, 56 * 4); bb.dataLen += 58 * 4; }
public override void ToBBuffer(BBuffer bb) { var len = dataLen; bb.WriteLength(len); if (len == 0) { return; } bb.Ensure(len); Buffer.BlockCopy(buf, 0, bb.buf, bb.dataLen, len); bb.dataLen += len; }
public override void FromBBuffer(BBuffer bb) { if (bb.offset + 58 * 4 > bb.dataLen) { throw new IndexOutOfRangeException(); } var nexts = new int[2]; inext = nexts[0]; inextp = nexts[1]; Buffer.BlockCopy(bb.buf, bb.offset, nexts, 0, 8); Buffer.BlockCopy(bb.buf, bb.offset + 8, SeedArray, 0, 56 * 4); bb.offset += 58 * 4; }
public override void FromBBuffer(BBuffer bb) { int len = bb.ReadLength(); if (bb.readLengthLimit != 0 && len > bb.readLengthLimit) { throw new Exception("overflow of limit"); } Resize(len); offset = 0; if (len == 0) { return; } Buffer.BlockCopy(bb.buf, bb.offset, buf, 0, len); bb.offset += len; }
public virtual void ToBBuffer(BBuffer bb) { }
public virtual void FromBBuffer(BBuffer bb) { }
public void ToBBuffer(BBuffer bb) { bb.Write(x); bb.Write(y); }
public void FromBBuffer(BBuffer bb) { bb.Read(ref x); bb.Read(ref y); }