C# Class Medusa.Siren.IO.IntegerHelper

Helper methods for encoding and decoding integer values.
Exibir arquivo Open project: fjz13/Medusa Class Usage Examples

Public Methods

Method Description
DecodeVarUInt16 ( Stream stream ) : ushort
DecodeVarUInt16 ( byte data, int &index ) : ushort
DecodeVarUInt32 ( Stream stream ) : uint
DecodeVarUInt32 ( byte data, int &index ) : uint
DecodeVarUInt64 ( Stream stream ) : ulong
DecodeVarUInt64 ( byte data, int &index ) : ulong
DecodeZigzag ( UInt16 value ) : Int16
DecodeZigzag ( UInt32 value ) : Int32
DecodeZigzag ( System.UInt64 value ) : System.Int64
EncodeVarUInt16 ( byte data, ushort value, int index ) : int
EncodeVarUInt16 ( Stream stream, ushort value ) : void
EncodeVarUInt32 ( byte data, uint value, int index ) : int
EncodeVarUInt32 ( Stream stream, uint value ) : void
EncodeVarUInt64 ( byte data, ulong value, int index ) : int
EncodeVarUInt64 ( Stream stream, ulong value ) : void
EncodeZigzag ( Int16 value ) : UInt16
EncodeZigzag ( Int32 value ) : UInt32
EncodeZigzag ( System.Int64 value ) : System.UInt64

Method Details

DecodeVarUInt16() public static method

public static DecodeVarUInt16 ( Stream stream ) : ushort
stream Stream
return ushort

DecodeVarUInt16() public static method

public static DecodeVarUInt16 ( byte data, int &index ) : ushort
data byte
index int
return ushort

DecodeVarUInt32() public static method

public static DecodeVarUInt32 ( Stream stream ) : uint
stream Stream
return uint

DecodeVarUInt32() public static method

public static DecodeVarUInt32 ( byte data, int &index ) : uint
data byte
index int
return uint

DecodeVarUInt64() public static method

public static DecodeVarUInt64 ( Stream stream ) : ulong
stream Stream
return ulong

DecodeVarUInt64() public static method

public static DecodeVarUInt64 ( byte data, int &index ) : ulong
data byte
index int
return ulong

DecodeZigzag() public static method

public static DecodeZigzag ( UInt16 value ) : Int16
value System.UInt16
return System.Int16

DecodeZigzag() public static method

public static DecodeZigzag ( UInt32 value ) : Int32
value System.UInt32
return System.Int32

DecodeZigzag() public static method

public static DecodeZigzag ( System.UInt64 value ) : System.Int64
value System.UInt64
return System.Int64

EncodeVarUInt16() public static method

public static EncodeVarUInt16 ( byte data, ushort value, int index ) : int
data byte
value ushort
index int
return int

EncodeVarUInt16() public static method

public static EncodeVarUInt16 ( Stream stream, ushort value ) : void
stream Stream
value ushort
return void

EncodeVarUInt32() public static method

public static EncodeVarUInt32 ( byte data, uint value, int index ) : int
data byte
value uint
index int
return int

EncodeVarUInt32() public static method

public static EncodeVarUInt32 ( Stream stream, uint value ) : void
stream Stream
value uint
return void

EncodeVarUInt64() public static method

public static EncodeVarUInt64 ( byte data, ulong value, int index ) : int
data byte
value ulong
index int
return int

EncodeVarUInt64() public static method

public static EncodeVarUInt64 ( Stream stream, ulong value ) : void
stream Stream
value ulong
return void

EncodeZigzag() public static method

public static EncodeZigzag ( Int16 value ) : UInt16
value System.Int16
return System.UInt16

EncodeZigzag() public static method

public static EncodeZigzag ( Int32 value ) : UInt32
value System.Int32
return System.UInt32

EncodeZigzag() public static method

public static EncodeZigzag ( System.Int64 value ) : System.UInt64
value System.Int64
return System.UInt64