示例#1
0
 internal void ReadPacket(IntPtr packet_ptr)
 {
     if (pointer == IntPtr.Zero || packet_ptr == IntPtr.Zero)
     {
         return;
     }
     BitStream_Native.BitStream_ReadPacket(pointer, packet_ptr);
 }
示例#2
0
    public long ReadLongCompressedDelta(long last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadLongCompressedDelta(pointer, last_value));
    }
示例#3
0
    public void WriteCompressedDelta(byte value, byte last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteByteCompressedDelta(pointer, value, last_value);
    }
示例#4
0
    public float ReadFloatCompressed()
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadFloatCompressed(pointer));
    }
示例#5
0
    public void Write(byte value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteByte(pointer, value);
    }
示例#6
0
    public long ReadLongCompressed()
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadLongCompressed(pointer));
    }
示例#7
0
    public byte[] GetData()
    {
        int    data_size = 0;
        IntPtr data_ptr  = BitStream_Native.BitStream_GetData(pointer, ref data_size);

        Array.Resize(ref GetData_Buffer, data_size);
        Marshal.Copy(data_ptr, GetData_Buffer, 0, data_size);
        return(GetData_Buffer);
    }
示例#8
0
    public void SetData(byte[] data)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_SetData(pointer, data, data.Length);
    }
示例#9
0
    public void IgnoreBytes(int numberOfBytes)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_IgnoreBytes(pointer, numberOfBytes);
    }
示例#10
0
    public void Reset()
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_Reset(pointer);
    }
示例#11
0
    public uint GetReadPointer()
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_GetReadOffset(pointer));
    }
示例#12
0
    public void SetReadPointer(uint offset)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_SetReadOffset(pointer, offset);
    }
示例#13
0
    internal void Close()
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_Close(pointer);
    }
示例#14
0
    public void WriteDelta(int value, int last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteIntDelta(pointer, value, last_value);
    }
示例#15
0
    public void WriteCompressed(int value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteIntCompressed(pointer, value);
    }
示例#16
0
    public float ReadFloat16(float min, float max)
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadFloat16(pointer, min, max));
    }
示例#17
0
    public float ReadFloatDelta(float last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadFloatDelta(pointer, last_value));
    }
示例#18
0
    public int ReadInt()
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadInt(pointer));
    }
示例#19
0
    public int ReadIntCompressedDelta(int last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadIntCompressedDelta(pointer, last_value));
    }
示例#20
0
    public byte ReadByteCompressedDelta(byte last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadByteCompressedDelta(pointer, last_value));
    }
示例#21
0
    public short ReadShortDelta(short last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadShortDelta(pointer, last_value));
    }
示例#22
0
    public void WriteCompressedDelta(long value, long last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteLongCompressedDelta(pointer, value, last_value);
    }
示例#23
0
    public byte ReadByteCompressed()
    {
        if (pointer == IntPtr.Zero)
        {
            return(0);
        }

        return(BitStream_Native.BitStream_ReadByteCompressed(pointer));
    }
示例#24
0
    public void Write(long value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteLong(pointer, value);
    }
示例#25
0
    public void Write(float value, float min, float max)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteFloat16(pointer, value, min, max);
    }
示例#26
0
    public void WriteCompressedDelta(float value, float last_value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteFloatCompressedDelta(pointer, value, last_value);
    }
示例#27
0
    public void Write(float value)
    {
        if (pointer == IntPtr.Zero)
        {
            return;
        }

        BitStream_Native.BitStream_WriteFloat(pointer, value);
    }
示例#28
0
 internal BitStream(IntPtr packet_ptr)
 {
     pointer = BitStream_Native.BitStream_Create2(packet_ptr);
 }
示例#29
0
 public BitStream()
 {
     pointer = BitStream_Native.BitStream_Create1();
     Reset();
 }