/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.12
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace SLNet {

using System;
using System.Runtime.InteropServices;

public class BitStream : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal BitStream(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(BitStream obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~BitStream() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if (swigCPtr.Handle != IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          SLikeNetPINVOKE.delete_BitStream(swigCPtr);
        }
        swigCPtr = new HandleRef(null, IntPtr.Zero);
      }
      GC.SuppressFinalize(this);
    }
  }

  //String reading using original api, but converted to c# logic
  public bool Read(out string varString) 
  {
      String tmp = new String('c', (int)GetNumberOfUnreadBits()/8);
      varString = CSharpStringReader(tmp);
      return varString!="";
  }

  //Byte read out
  public bool Read(byte[] inOutByteArray,uint numberOfBytes) 
  {
      return CSharpByteReader(inOutByteArray,numberOfBytes);      
  }

  public bool Read(out char outTemplateVar)
  {
   	byte tmp;
	bool returnVal=Read(out tmp);
	outTemplateVar=(char)tmp;
	return returnVal;
  }

  public bool ReadCompressed(out char outTemplateVar)
  {
   	byte tmp;
	bool returnVal=ReadCompressed(out tmp);
	outTemplateVar=(char)tmp;
	return returnVal;
  }

  public bool ReadCompressedDelta(out char outTemplateVar)
  {
   	byte tmp;
	bool returnVal=ReadCompressedDelta(out tmp);
	outTemplateVar=(char)tmp;
	return returnVal;
  }

  public bool ReadDelta(out char outTemplateVar)
  {
   	byte tmp;
	bool returnVal=ReadDelta(out tmp);;
	outTemplateVar=(char)tmp;
	return returnVal;
  }

  public bool ReadCompressed(out string var)
  {
      String tmp = new String('c', (int)GetNumberOfUnreadBits()/8);
      var = CSharpStringReaderCompressed(tmp);
      return var!="";
  }

  public bool ReadCompressedDelta(out string var)
  {
      String tmp = new String('c', (int)GetNumberOfUnreadBits()/8);
      var = CSharpStringReaderCompressedDelta(tmp);
      return var!="";
  }

  public bool ReadDelta(out string var)
  {
      String tmp = new String('c', (int)GetNumberOfUnreadBits()/8);
      var = CSharpStringReaderDelta(tmp);
      return var!="";
  }

  public uint CopyData(out byte[] outByteArray)
  {
	byte[] tmp= new byte[GetNumberOfBitsAllocated()/8];
	uint byteNum = CSharpCopyDataHelper(tmp);
	outByteArray=tmp;
	return byteNum;
  }

  public byte[] GetData()
  {
	byte[] tmp= new byte[GetNumberOfBitsAllocated()/8];
	CSharpCopyDataHelper(tmp);
	return tmp;
  }

  public void PrintBits(out string var)
  {
      String tmp = new String('c', (int)(GetNumberOfBitsAllocated()+GetNumberOfBitsAllocated()/8));
      var = CSharpPrintBitsHelper(tmp);
  }

  public void PrintHex(out string var)
  {
      String tmp = new String('c', (int)(GetNumberOfBitsAllocated()/4+GetNumberOfBitsAllocated()/8));
      var = CSharpPrintHexHelper(tmp);
  }

  public bool Serialize(bool WriteToBitstream,ref char inOutTemplateVar)
  {
      byte tmp = (byte)inOutTemplateVar;
      bool returnVal = Serialize(WriteToBitstream,ref tmp);
      inOutTemplateVar=(char)tmp;
      return returnVal;
  }
  public bool SerializeDelta(bool WriteToBitstream,ref char inOutTemplateVar)
  {
      byte tmp = (byte)inOutTemplateVar;
      bool returnVal = SerializeDelta(WriteToBitstream,ref tmp);
      inOutTemplateVar=(char)tmp;
      return returnVal;
  }

  public bool SerializeCompressed(bool WriteToBitstream,ref char inOutTemplateVar)
  {
      byte tmp = (byte)inOutTemplateVar;
      bool returnVal = SerializeCompressed(WriteToBitstream,ref tmp);
      inOutTemplateVar=(char)tmp;
      return returnVal;
  }

  public bool SerializeCompressedDelta(bool WriteToBitstream,ref char inOutTemplateVar)
  {
      byte tmp = (byte)inOutTemplateVar;
      bool returnVal = SerializeCompressedDelta(WriteToBitstream,ref tmp);
      inOutTemplateVar=(char)tmp;
      return returnVal;
  }

  public bool ReadAlignedBytesSafeAlloc( out byte[] outByteArray, int inputLength, int maxBytesToRead )
  {
	outByteArray= new byte[inputLength];
	return ReadAlignedBytesSafe(outByteArray,inputLength,maxBytesToRead);
  }

  public bool ReadAlignedBytesSafeAlloc( out byte[] outByteArray, uint inputLength, uint maxBytesToRead )
  {
	outByteArray= new byte[inputLength];
	return ReadAlignedBytesSafe(outByteArray,inputLength,maxBytesToRead);
  }



  public static BitStream GetInstance() {
    IntPtr cPtr = SLikeNetPINVOKE.BitStream_GetInstance();
    BitStream ret = (cPtr == IntPtr.Zero) ? null : new BitStream(cPtr, false);
    return ret;
  }

  public static void DestroyInstance(BitStream i) {
    SLikeNetPINVOKE.BitStream_DestroyInstance(BitStream.getCPtr(i));
  }

  public BitStream() : this(SLikeNetPINVOKE.new_BitStream__SWIG_0(), true) {
  }

  public BitStream(uint initialBytesToAllocate) : this(SLikeNetPINVOKE.new_BitStream__SWIG_1(initialBytesToAllocate), true) {
  }

  public BitStream(byte[] _data, uint lengthInBytes, bool _copyData) : this(SLikeNetPINVOKE.new_BitStream__SWIG_2(_data, lengthInBytes, _copyData), true) {
  }

  public void Reset() {
    SLikeNetPINVOKE.BitStream_Reset(swigCPtr);
  }

  public bool SerializeFloat16(bool writeToBitstream, ref float inOutFloat, float floatMin, float floatMax) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeFloat16(swigCPtr, writeToBitstream, ref inOutFloat, floatMin, floatMax);
    return ret;
  }

  public bool SerializeBits(bool writeToBitstream, byte[] inOutByteArray, uint numberOfBitsToSerialize, bool rightAlignedBits) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeBits__SWIG_0(swigCPtr, writeToBitstream, inOutByteArray, numberOfBitsToSerialize, rightAlignedBits);
    return ret;
  }

  public bool SerializeBits(bool writeToBitstream, byte[] inOutByteArray, uint numberOfBitsToSerialize) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeBits__SWIG_1(swigCPtr, writeToBitstream, inOutByteArray, numberOfBitsToSerialize);
    return ret;
  }

  public bool Read(SWIGTYPE_p_p_wchar_t varString) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_1(swigCPtr, SWIGTYPE_p_p_wchar_t.getCPtr(varString));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Read(SWIGTYPE_p_p_wchar_t varString, uint varStringLength) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_2(swigCPtr, SWIGTYPE_p_p_wchar_t.getCPtr(varString), varStringLength);
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressed(SWIGTYPE_p_p_wchar_t varString) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_1(swigCPtr, SWIGTYPE_p_p_wchar_t.getCPtr(varString));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressed(SWIGTYPE_p_p_wchar_t varString, uint varStringLength) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_2(swigCPtr, SWIGTYPE_p_p_wchar_t.getCPtr(varString), varStringLength);
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Read(BitStream bitStream, uint numberOfBits) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_3(swigCPtr, BitStream.getCPtr(bitStream), numberOfBits);
    return ret;
  }

  public bool Read(BitStream bitStream) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_4(swigCPtr, BitStream.getCPtr(bitStream));
    return ret;
  }

  public void Write(BitStream bitStream, uint numberOfBits) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_1(swigCPtr, BitStream.getCPtr(bitStream), numberOfBits);
  }

  public void Write(BitStream bitStream) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_2(swigCPtr, BitStream.getCPtr(bitStream));
  }

  public void WriteFloat16(float x, float floatMin, float floatMax) {
    SLikeNetPINVOKE.BitStream_WriteFloat16(swigCPtr, x, floatMin, floatMax);
  }

  public bool ReadFloat16(out float outFloat, float floatMin, float floatMax) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadFloat16(swigCPtr, out outFloat, floatMin, floatMax);
    return ret;
  }

  public void ResetReadPointer() {
    SLikeNetPINVOKE.BitStream_ResetReadPointer(swigCPtr);
  }

  public void ResetWritePointer() {
    SLikeNetPINVOKE.BitStream_ResetWritePointer(swigCPtr);
  }

  public void AssertStreamEmpty() {
    SLikeNetPINVOKE.BitStream_AssertStreamEmpty(swigCPtr);
  }

  public void PrintBits(string arg0, uint outLength) {
    SLikeNetPINVOKE.BitStream_PrintBits__SWIG_0(swigCPtr, arg0, outLength);
  }

  public void PrintBits() {
    SLikeNetPINVOKE.BitStream_PrintBits__SWIG_1(swigCPtr);
  }

  public void PrintHex(string arg0, uint outLength) {
    SLikeNetPINVOKE.BitStream_PrintHex__SWIG_0(swigCPtr, arg0, outLength);
  }

  public void PrintHex() {
    SLikeNetPINVOKE.BitStream_PrintHex__SWIG_1(swigCPtr);
  }

  public void IgnoreBits(uint numberOfBits) {
    SLikeNetPINVOKE.BitStream_IgnoreBits(swigCPtr, numberOfBits);
  }

  public void IgnoreBytes(uint numberOfBytes) {
    SLikeNetPINVOKE.BitStream_IgnoreBytes(swigCPtr, numberOfBytes);
  }

  public void SetWriteOffset(uint offset) {
    SLikeNetPINVOKE.BitStream_SetWriteOffset(swigCPtr, offset);
  }

  public uint GetNumberOfBitsUsed() {
    uint ret = SLikeNetPINVOKE.BitStream_GetNumberOfBitsUsed(swigCPtr);
    return ret;
  }

  public uint GetWriteOffset() {
    uint ret = SLikeNetPINVOKE.BitStream_GetWriteOffset(swigCPtr);
    return ret;
  }

  public uint GetNumberOfBytesUsed() {
    uint ret = SLikeNetPINVOKE.BitStream_GetNumberOfBytesUsed(swigCPtr);
    return ret;
  }

  public uint GetReadOffset() {
    uint ret = SLikeNetPINVOKE.BitStream_GetReadOffset(swigCPtr);
    return ret;
  }

  public void SetReadOffset(uint newReadOffset) {
    SLikeNetPINVOKE.BitStream_SetReadOffset(swigCPtr, newReadOffset);
  }

  public uint GetNumberOfUnreadBits() {
    uint ret = SLikeNetPINVOKE.BitStream_GetNumberOfUnreadBits(swigCPtr);
    return ret;
  }

  public void SetData(byte[] inByteArray) {
    SLikeNetPINVOKE.BitStream_SetData(swigCPtr, inByteArray);
  }

  public void WriteBits(byte[] inByteArray, uint numberOfBitsToWrite, bool rightAlignedBits) {
    SLikeNetPINVOKE.BitStream_WriteBits__SWIG_0(swigCPtr, inByteArray, numberOfBitsToWrite, rightAlignedBits);
  }

  public void WriteBits(byte[] inByteArray, uint numberOfBitsToWrite) {
    SLikeNetPINVOKE.BitStream_WriteBits__SWIG_1(swigCPtr, inByteArray, numberOfBitsToWrite);
  }

  public void WriteAlignedBytes(byte[] inByteArray, uint numberOfBytesToWrite) {
    SLikeNetPINVOKE.BitStream_WriteAlignedBytes(swigCPtr, inByteArray, numberOfBytesToWrite);
  }

  public void EndianSwapBytes(int byteOffset, int length) {
    SLikeNetPINVOKE.BitStream_EndianSwapBytes(swigCPtr, byteOffset, length);
  }

  public bool ReadAlignedBytes(byte[] inOutByteArray, uint numberOfBytesToRead) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadAlignedBytes(swigCPtr, inOutByteArray, numberOfBytesToRead);
    return ret;
  }

  public void AlignWriteToByteBoundary() {
    SLikeNetPINVOKE.BitStream_AlignWriteToByteBoundary(swigCPtr);
  }

  public void AlignReadToByteBoundary() {
    SLikeNetPINVOKE.BitStream_AlignReadToByteBoundary(swigCPtr);
  }

  public bool ReadBits(byte[] inOutByteArray, uint numberOfBitsToRead, bool alignBitsToRight) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadBits__SWIG_0(swigCPtr, inOutByteArray, numberOfBitsToRead, alignBitsToRight);
    return ret;
  }

  public bool ReadBits(byte[] inOutByteArray, uint numberOfBitsToRead) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadBits__SWIG_1(swigCPtr, inOutByteArray, numberOfBitsToRead);
    return ret;
  }

  public void Write0() {
    SLikeNetPINVOKE.BitStream_Write0(swigCPtr);
  }

  public void Write1() {
    SLikeNetPINVOKE.BitStream_Write1(swigCPtr);
  }

  public bool ReadBit() {
    bool ret = SLikeNetPINVOKE.BitStream_ReadBit(swigCPtr);
    return ret;
  }

  public void AssertCopyData() {
    SLikeNetPINVOKE.BitStream_AssertCopyData(swigCPtr);
  }

  public void SetNumberOfBitsAllocated(uint lengthInBits) {
    SLikeNetPINVOKE.BitStream_SetNumberOfBitsAllocated(swigCPtr, lengthInBits);
  }

  public void AddBitsAndReallocate(uint numberOfBitsToWrite) {
    SLikeNetPINVOKE.BitStream_AddBitsAndReallocate(swigCPtr, numberOfBitsToWrite);
  }

  public uint GetNumberOfBitsAllocated() {
    uint ret = SLikeNetPINVOKE.BitStream_GetNumberOfBitsAllocated(swigCPtr);
    return ret;
  }

  public void PadWithZeroToByteLength(uint bytes) {
    SLikeNetPINVOKE.BitStream_PadWithZeroToByteLength(swigCPtr, bytes);
  }

  public static int NumberOfLeadingZeroes(byte x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_0(x);
    return ret;
  }

  public static int NumberOfLeadingZeroes(ushort x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_1(x);
    return ret;
  }

  public static int NumberOfLeadingZeroes(uint x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_2(x);
    return ret;
  }

  public static int NumberOfLeadingZeroes(ulong x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_3(x);
    return ret;
  }

  public static int NumberOfLeadingZeroes(sbyte x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_4(x);
    return ret;
  }

  public static int NumberOfLeadingZeroes(short x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_5(x);
    return ret;
  }

  public static int NumberOfLeadingZeroes(int x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_6(x);
    return ret;
  }

  public static int NumberOfLeadingZeroes(long x) {
    int ret = SLikeNetPINVOKE.BitStream_NumberOfLeadingZeroes__SWIG_7(x);
    return ret;
  }

  public void Write(string inStringVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_3(swigCPtr, inStringVar);
  }

  public void Write(SWIGTYPE_p_wchar_t inStringVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_4(swigCPtr, SWIGTYPE_p_wchar_t.getCPtr(inStringVar));
  }

  public void WriteCompressed(string inStringVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_1(swigCPtr, inStringVar);
  }

  public void WriteCompressed(SWIGTYPE_p_wchar_t inStringVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_2(swigCPtr, SWIGTYPE_p_wchar_t.getCPtr(inStringVar));
  }

  public static bool DoEndianSwap() {
    bool ret = SLikeNetPINVOKE.BitStream_DoEndianSwap();
    return ret;
  }

  public static bool IsBigEndian() {
    bool ret = SLikeNetPINVOKE.BitStream_IsBigEndian();
    return ret;
  }

  public static bool IsNetworkOrder() {
    bool ret = SLikeNetPINVOKE.BitStream_IsNetworkOrder();
    return ret;
  }

  public static bool IsNetworkOrderInternal() {
    bool ret = SLikeNetPINVOKE.BitStream_IsNetworkOrderInternal();
    return ret;
  }

  public static void ReverseBytes(byte[] inByteArray, byte[] inOutByteArray, uint length) {
    SLikeNetPINVOKE.BitStream_ReverseBytes(inByteArray, inOutByteArray, length);
  }

  public static void ReverseBytesInPlace(byte[] inOutData, uint length) {
    SLikeNetPINVOKE.BitStream_ReverseBytesInPlace(inOutData, length);
  }

  private string CSharpStringReader(string inString) {
    string ret = SLikeNetPINVOKE.BitStream_CSharpStringReader(swigCPtr, inString);
    return ret;
  }

  private bool CSharpByteReader(byte[] inOutByteArray, uint numberOfBytes) {
    bool ret = SLikeNetPINVOKE.BitStream_CSharpByteReader(swigCPtr, inOutByteArray, numberOfBytes);
    return ret;
  }

  private string CSharpStringReaderCompressedDelta(string inString) {
    string ret = SLikeNetPINVOKE.BitStream_CSharpStringReaderCompressedDelta(swigCPtr, inString);
    return ret;
  }

  private string CSharpStringReaderDelta(string inString) {
    string ret = SLikeNetPINVOKE.BitStream_CSharpStringReaderDelta(swigCPtr, inString);
    return ret;
  }

  private string CSharpStringReaderCompressed(string inString) {
    string ret = SLikeNetPINVOKE.BitStream_CSharpStringReaderCompressed(swigCPtr, inString);
    return ret;
  }

  public void Write(byte[] inputByteArray, uint numberOfBytes) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_6(swigCPtr, inputByteArray, numberOfBytes);
  }

  private uint CSharpCopyDataHelper(byte[] inOutByteArray) {
    uint ret = SLikeNetPINVOKE.BitStream_CSharpCopyDataHelper(swigCPtr, inOutByteArray);
    return ret;
  }

  private string CSharpPrintBitsHelper(string inString) {
    string ret = SLikeNetPINVOKE.BitStream_CSharpPrintBitsHelper(swigCPtr, inString);
    return ret;
  }

  private string CSharpPrintHexHelper(string inString) {
    string ret = SLikeNetPINVOKE.BitStream_CSharpPrintHexHelper(swigCPtr, inString);
    return ret;
  }

  public void Serialize(bool writeToBitstream, byte[] inputByteArray, uint numberOfBytes) {
    SLikeNetPINVOKE.BitStream_Serialize__SWIG_1(swigCPtr, writeToBitstream, inputByteArray, numberOfBytes);
  }

  public bool ReadAlignedBytesSafe(byte[] inOutByteArray, int inputLength, int maxBytesToRead) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadAlignedBytesSafe__SWIG_0(swigCPtr, inOutByteArray, inputLength, maxBytesToRead);
    return ret;
  }

  public bool ReadAlignedBytesSafe(byte[] inOutByteArray, uint inputLength, uint maxBytesToRead) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadAlignedBytesSafe__SWIG_1(swigCPtr, inOutByteArray, inputLength, maxBytesToRead);
    return ret;
  }

  public void WriteAlignedVar8(byte[] inByteArray) {
    SLikeNetPINVOKE.BitStream_WriteAlignedVar8(swigCPtr, inByteArray);
  }

  public bool ReadAlignedVar8(byte[] inOutByteArray) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadAlignedVar8(swigCPtr, inOutByteArray);
    return ret;
  }

  public void WriteAlignedVar16(byte[] inByteArray) {
    SLikeNetPINVOKE.BitStream_WriteAlignedVar16(swigCPtr, inByteArray);
  }

  public bool ReadAlignedVar16(byte[] inOutByteArray) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadAlignedVar16(swigCPtr, inOutByteArray);
    return ret;
  }

  public void WriteAlignedVar32(byte[] inByteArray) {
    SLikeNetPINVOKE.BitStream_WriteAlignedVar32(swigCPtr, inByteArray);
  }

  public bool ReadAlignedVar32(byte[] inOutByteArray) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadAlignedVar32(swigCPtr, inOutByteArray);
    return ret;
  }

  public void WriteAlignedBytesSafe(byte[] inByteArray, uint inputLength, uint maxBytesToWrite) {
    SLikeNetPINVOKE.BitStream_WriteAlignedBytesSafe(swigCPtr, inByteArray, inputLength, maxBytesToWrite);
  }

  public bool Serialize(bool writeToBitstream, ref bool inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_2(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool Serialize(bool writeToBitstream, ref byte inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_3(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool Serialize(bool writeToBitstream, ref short inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_4(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool Serialize(bool writeToBitstream, ref ushort inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_5(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool Serialize(bool writeToBitstream, ref int inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_6(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool Serialize(bool writeToBitstream, ref long inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_7(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool Serialize(bool writeToBitstream, ref float inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_8(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool Serialize(bool writeToBitstream, RakString inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_9(swigCPtr, writeToBitstream, RakString.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Serialize(bool writeToBitstream, RakNetGUID inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_10(swigCPtr, writeToBitstream, RakNetGUID.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Serialize(bool writeToBitstream, uint24_t inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Serialize__SWIG_11(swigCPtr, writeToBitstream, uint24_t.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref bool inOutCurrentValue, bool lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_2(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref bool inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_3(swigCPtr, writeToBitstream, ref inOutCurrentValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref byte inOutCurrentValue, byte lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_4(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref byte inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_5(swigCPtr, writeToBitstream, ref inOutCurrentValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref short inOutCurrentValue, short lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_6(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref short inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_7(swigCPtr, writeToBitstream, ref inOutCurrentValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref ushort inOutCurrentValue, ushort lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_8(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref ushort inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_9(swigCPtr, writeToBitstream, ref inOutCurrentValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref int inOutCurrentValue, int lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_10(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref int inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_11(swigCPtr, writeToBitstream, ref inOutCurrentValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref long inOutCurrentValue, long lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_12(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref long inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_13(swigCPtr, writeToBitstream, ref inOutCurrentValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref float inOutCurrentValue, float lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_14(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, ref float inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_15(swigCPtr, writeToBitstream, ref inOutCurrentValue);
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, RakString inOutCurrentValue, RakString lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_16(swigCPtr, writeToBitstream, RakString.getCPtr(inOutCurrentValue), RakString.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, RakString inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_17(swigCPtr, writeToBitstream, RakString.getCPtr(inOutCurrentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, RakNetGUID inOutCurrentValue, RakNetGUID lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_18(swigCPtr, writeToBitstream, RakNetGUID.getCPtr(inOutCurrentValue), RakNetGUID.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, RakNetGUID inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_19(swigCPtr, writeToBitstream, RakNetGUID.getCPtr(inOutCurrentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, uint24_t inOutCurrentValue, uint24_t lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_20(swigCPtr, writeToBitstream, uint24_t.getCPtr(inOutCurrentValue), uint24_t.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeDelta(bool writeToBitstream, uint24_t inOutCurrentValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeDelta__SWIG_21(swigCPtr, writeToBitstream, uint24_t.getCPtr(inOutCurrentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, ref bool inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_1(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, ref byte inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_2(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, ref short inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_3(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, ref ushort inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_4(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, ref int inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_5(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, ref long inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_6(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, ref float inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_7(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, RakString inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_8(swigCPtr, writeToBitstream, RakString.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, RakNetGUID inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_9(swigCPtr, writeToBitstream, RakNetGUID.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressed(bool writeToBitstream, uint24_t inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressed__SWIG_10(swigCPtr, writeToBitstream, uint24_t.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref bool inOutCurrentValue, bool lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_2(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref bool inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_3(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref byte inOutCurrentValue, byte lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_4(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref byte inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_5(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref short inOutCurrentValue, short lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_6(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref short inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_7(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref ushort inOutCurrentValue, ushort lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_8(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref ushort inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_9(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref int inOutCurrentValue, int lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_10(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref int inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_11(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref long inOutCurrentValue, long lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_12(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref long inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_13(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref float inOutCurrentValue, float lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_14(swigCPtr, writeToBitstream, ref inOutCurrentValue, lastValue);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, ref float inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_15(swigCPtr, writeToBitstream, ref inOutTemplateVar);
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, RakString inOutCurrentValue, RakString lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_16(swigCPtr, writeToBitstream, RakString.getCPtr(inOutCurrentValue), RakString.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, RakString inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_17(swigCPtr, writeToBitstream, RakString.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, RakNetGUID inOutCurrentValue, RakNetGUID lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_18(swigCPtr, writeToBitstream, RakNetGUID.getCPtr(inOutCurrentValue), RakNetGUID.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, RakNetGUID inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_19(swigCPtr, writeToBitstream, RakNetGUID.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, uint24_t inOutCurrentValue, uint24_t lastValue) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_20(swigCPtr, writeToBitstream, uint24_t.getCPtr(inOutCurrentValue), uint24_t.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool SerializeCompressedDelta(bool writeToBitstream, uint24_t inOutTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_21(swigCPtr, writeToBitstream, uint24_t.getCPtr(inOutTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void Write(bool inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_8(swigCPtr, inTemplateVar);
  }

  public void Write(byte inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_9(swigCPtr, inTemplateVar);
  }

  public void Write(char inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_10(swigCPtr, inTemplateVar);
  }

  public void Write(short inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_11(swigCPtr, inTemplateVar);
  }

  public void Write(ushort inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_12(swigCPtr, inTemplateVar);
  }

  public void Write(int inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_13(swigCPtr, inTemplateVar);
  }

  public void Write(long inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_14(swigCPtr, inTemplateVar);
  }

  public void Write(float inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_15(swigCPtr, inTemplateVar);
  }

  public void Write(RakString inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_16(swigCPtr, RakString.getCPtr(inTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Write(RakNetGUID inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_17(swigCPtr, RakNetGUID.getCPtr(inTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Write(uint24_t inTemplateVar) {
    SLikeNetPINVOKE.BitStream_Write__SWIG_18(swigCPtr, uint24_t.getCPtr(inTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteDelta(string currentValue, string lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_2(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(string currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_3(swigCPtr, currentValue);
  }

  public void WriteDelta(bool currentValue, bool lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_4(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(bool currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_5(swigCPtr, currentValue);
  }

  public void WriteDelta(byte currentValue, byte lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_6(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(byte currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_7(swigCPtr, currentValue);
  }

  public void WriteDelta(char currentValue, char lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_8(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(char currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_9(swigCPtr, currentValue);
  }

  public void WriteDelta(short currentValue, short lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_10(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(short currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_11(swigCPtr, currentValue);
  }

  public void WriteDelta(ushort currentValue, ushort lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_12(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(ushort currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_13(swigCPtr, currentValue);
  }

  public void WriteDelta(int currentValue, int lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_14(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(int currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_15(swigCPtr, currentValue);
  }

  public void WriteDelta(long currentValue, long lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_16(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(long currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_17(swigCPtr, currentValue);
  }

  public void WriteDelta(float currentValue, float lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_18(swigCPtr, currentValue, lastValue);
  }

  public void WriteDelta(float currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_19(swigCPtr, currentValue);
  }

  public void WriteDelta(RakString currentValue, RakString lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_20(swigCPtr, RakString.getCPtr(currentValue), RakString.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteDelta(RakString currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_21(swigCPtr, RakString.getCPtr(currentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteDelta(RakNetGUID currentValue, RakNetGUID lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_22(swigCPtr, RakNetGUID.getCPtr(currentValue), RakNetGUID.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteDelta(RakNetGUID currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_23(swigCPtr, RakNetGUID.getCPtr(currentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteDelta(uint24_t currentValue, uint24_t lastValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_24(swigCPtr, uint24_t.getCPtr(currentValue), uint24_t.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteDelta(uint24_t currentValue) {
    SLikeNetPINVOKE.BitStream_WriteDelta__SWIG_25(swigCPtr, uint24_t.getCPtr(currentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressed(bool inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_5(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(byte inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_6(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(char inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_7(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(short inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_8(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(ushort inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_9(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(int inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_10(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(long inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_11(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(float inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_12(swigCPtr, inTemplateVar);
  }

  public void WriteCompressed(RakString inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_13(swigCPtr, RakString.getCPtr(inTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressed(RakNetGUID inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_14(swigCPtr, RakNetGUID.getCPtr(inTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressed(uint24_t inTemplateVar) {
    SLikeNetPINVOKE.BitStream_WriteCompressed__SWIG_15(swigCPtr, uint24_t.getCPtr(inTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressedDelta(string currentValue, string lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_2(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(string currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_3(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(bool currentValue, bool lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_4(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(bool currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_5(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(byte currentValue, byte lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_6(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(byte currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_7(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(char currentValue, char lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_8(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(char currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_9(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(short currentValue, short lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_10(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(short currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_11(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(ushort currentValue, ushort lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_12(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(ushort currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_13(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(int currentValue, int lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_14(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(int currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_15(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(long currentValue, long lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_16(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(long currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_17(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(float currentValue, float lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_18(swigCPtr, currentValue, lastValue);
  }

  public void WriteCompressedDelta(float currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_19(swigCPtr, currentValue);
  }

  public void WriteCompressedDelta(RakString currentValue, RakString lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_20(swigCPtr, RakString.getCPtr(currentValue), RakString.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressedDelta(RakString currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_21(swigCPtr, RakString.getCPtr(currentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressedDelta(RakNetGUID currentValue, RakNetGUID lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_22(swigCPtr, RakNetGUID.getCPtr(currentValue), RakNetGUID.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressedDelta(RakNetGUID currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_23(swigCPtr, RakNetGUID.getCPtr(currentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressedDelta(uint24_t currentValue, uint24_t lastValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_24(swigCPtr, uint24_t.getCPtr(currentValue), uint24_t.getCPtr(lastValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public void WriteCompressedDelta(uint24_t currentValue) {
    SLikeNetPINVOKE.BitStream_WriteCompressedDelta__SWIG_25(swigCPtr, uint24_t.getCPtr(currentValue));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool Read(out bool outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_5(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool Read(out byte outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_6(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool Read(out short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_7(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool Read(SWIGTYPE_p_unsigned_short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_8(swigCPtr, SWIGTYPE_p_unsigned_short.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Read(out int outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_9(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool Read(out long outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_10(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool Read(out float outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_11(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool Read(RakString outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_12(swigCPtr, RakString.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Read(RakNetGUID outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_13(swigCPtr, RakNetGUID.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Read(uint24_t outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_Read__SWIG_14(swigCPtr, uint24_t.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadDelta(out bool outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_1(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadDelta(out byte outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_2(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadDelta(out short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_3(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadDelta(SWIGTYPE_p_unsigned_short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_4(swigCPtr, SWIGTYPE_p_unsigned_short.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadDelta(out int outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_5(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadDelta(out long outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_6(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadDelta(out float outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_7(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadDelta(RakString outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_8(swigCPtr, RakString.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadDelta(RakNetGUID outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_9(swigCPtr, RakNetGUID.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadDelta(uint24_t outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadDelta__SWIG_10(swigCPtr, uint24_t.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressed(out bool outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_3(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressed(out byte outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_4(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressed(out short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_5(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressed(SWIGTYPE_p_unsigned_short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_6(swigCPtr, SWIGTYPE_p_unsigned_short.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressed(out int outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_7(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressed(out long outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_8(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressed(out float outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_9(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressed(RakString outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_10(swigCPtr, RakString.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressed(RakNetGUID outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_11(swigCPtr, RakNetGUID.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressed(uint24_t outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressed__SWIG_12(swigCPtr, uint24_t.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressedDelta(out bool outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_1(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressedDelta(out byte outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_2(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressedDelta(out short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_3(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressedDelta(SWIGTYPE_p_unsigned_short outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_4(swigCPtr, SWIGTYPE_p_unsigned_short.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressedDelta(out int outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_5(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressedDelta(out long outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_6(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressedDelta(out float outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_7(swigCPtr, out outTemplateVar);
    return ret;
  }

  public bool ReadCompressedDelta(RakString outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_8(swigCPtr, RakString.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressedDelta(RakNetGUID outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_9(swigCPtr, RakNetGUID.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadCompressedDelta(uint24_t outTemplateVar) {
    bool ret = SLikeNetPINVOKE.BitStream_ReadCompressedDelta__SWIG_10(swigCPtr, uint24_t.getCPtr(outTemplateVar));
    if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
