public static NetStream AllocStream(int sizeBytes = 0) { lock (poolLock) { NetStream netStream = GrabStream(); netStream.Alloc(CalculateTierForSize(sizeBytes)); netStream.offsetBits = 0; netStream.Seek(0); return(netStream); } }