C# 클래스 GSF.Encoding7Bit

Contains 7 bit encoding functions
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
GetSize ( uint value1 ) : int

Gets the number of bytes required to write the provided value.

GetSize ( ulong value1 ) : int

Gets the number of bytes required to write the provided value.

GetSizeInt15 ( short value1 ) : int

Gets the number of bytes required to write the provided value.

Measure15 ( byte stream, int position ) : int

Gets the number of bytes for the supplied value in the stream.

MeasureInt15 ( byte stream ) : int

Gets the number of bytes for the supplied value in the stream.

MeasureUInt32 ( byte stream ) : int

Gets the number of bytes for the supplied value in the stream.

MeasureUInt32 ( byte stream, int position ) : int

Gets the number of bytes for the supplied value in the stream.

MeasureUInt64 ( byte stream ) : int

Gets the number of bytes for the supplied value in the stream.

MeasureUInt64 ( byte stream, int position ) : int

Gets the number of bytes for the supplied value in the stream.

ReadInt15 ( Func stream ) : short

Reads a 7-bit encoded uint.

ReadInt15 ( Stream stream ) : short

Reads a 7-bit encoded uint.

This method will check for the end of the stream

ReadUInt32 ( Func stream ) : uint

Reads a 7-bit encoded uint.

ReadUInt32 ( Stream stream ) : uint

Reads a 7-bit encoded uint.

This method will check for the end of the stream

ReadUInt64 ( Func stream ) : ulong

Reads a 7-bit encoded uint.

ReadUInt64 ( Stream stream ) : ulong

Reads a 7-bit encoded ulong.

This method will check for the end of the stream

Write ( Action stream, uint value1 ) : void

Writes the 7-bit encoded value to the provided stream.

Write ( Action stream, ulong value1 ) : void

Writes the 7-bit encoded value to the provided stream.

WriteInt15 ( Action stream, short value1 ) : void

Writes the 7-bit encoded value to the provided stream.

비공개 메소드들

메소드 설명
ReadInt15 ( byte stream, int &position ) : short
ReadUInt32 ( byte stream, int &position ) : uint
ReadUInt64 ( byte stream, int &position ) : ulong
Write ( byte stream, uint value1 ) : int
Write ( byte stream, ulong value1 ) : int
Write ( byte stream, int &position, uint value1 ) : void
Write ( byte stream, int &position, ulong value1 ) : void
WriteInt15 ( byte stream, short value1 ) : int
WriteInt15 ( byte stream, int &position, short value1 ) : void

메소드 상세

GetSize() 공개 정적인 메소드

Gets the number of bytes required to write the provided value.
public static GetSize ( uint value1 ) : int
value1 uint the value to measure
리턴 int

GetSize() 공개 정적인 메소드

Gets the number of bytes required to write the provided value.
public static GetSize ( ulong value1 ) : int
value1 ulong the value to measure
리턴 int

GetSizeInt15() 공개 정적인 메소드

Gets the number of bytes required to write the provided value.
public static GetSizeInt15 ( short value1 ) : int
value1 short the value to measure
리턴 int

Measure15() 공개 정적인 메소드

Gets the number of bytes for the supplied value in the stream.
public static Measure15 ( byte stream, int position ) : int
stream byte
position int
리턴 int

MeasureInt15() 공개 정적인 메소드

Gets the number of bytes for the supplied value in the stream.
public static MeasureInt15 ( byte stream ) : int
stream byte
리턴 int

MeasureUInt32() 공개 정적인 메소드

Gets the number of bytes for the supplied value in the stream.
public static MeasureUInt32 ( byte stream ) : int
stream byte
리턴 int

MeasureUInt32() 공개 정적인 메소드

Gets the number of bytes for the supplied value in the stream.
public static MeasureUInt32 ( byte stream, int position ) : int
stream byte
position int
리턴 int

MeasureUInt64() 공개 정적인 메소드

Gets the number of bytes for the supplied value in the stream.
public static MeasureUInt64 ( byte stream ) : int
stream byte
리턴 int

MeasureUInt64() 공개 정적인 메소드

Gets the number of bytes for the supplied value in the stream.
public static MeasureUInt64 ( byte stream, int position ) : int
stream byte
position int
리턴 int

ReadInt15() 공개 정적인 메소드

Reads a 7-bit encoded uint.
public static ReadInt15 ( Func stream ) : short
stream Func A delegate where to read the next byte
리턴 short

ReadInt15() 공개 정적인 메소드

Reads a 7-bit encoded uint.
This method will check for the end of the stream
Occurs if the end of the stream was reached.
public static ReadInt15 ( Stream stream ) : short
stream Stream A stream to read from.
리턴 short

ReadUInt32() 공개 정적인 메소드

Reads a 7-bit encoded uint.
public static ReadUInt32 ( Func stream ) : uint
stream Func A delegate where to read the next byte
리턴 uint

ReadUInt32() 공개 정적인 메소드

Reads a 7-bit encoded uint.
This method will check for the end of the stream
Occurs if the end of the stream was reached.
public static ReadUInt32 ( Stream stream ) : uint
stream Stream A stream to read from.
리턴 uint

ReadUInt64() 공개 정적인 메소드

Reads a 7-bit encoded uint.
public static ReadUInt64 ( Func stream ) : ulong
stream Func A delegate where to read the next byte
리턴 ulong

ReadUInt64() 공개 정적인 메소드

Reads a 7-bit encoded ulong.
This method will check for the end of the stream
Occurs if the end of the stream was reached.
public static ReadUInt64 ( Stream stream ) : ulong
stream Stream A stream to read from.
리턴 ulong

Write() 공개 정적인 메소드

Writes the 7-bit encoded value to the provided stream.
public static Write ( Action stream, uint value1 ) : void
stream Action a delegate to a write byte method
value1 uint the value to write
리턴 void

Write() 공개 정적인 메소드

Writes the 7-bit encoded value to the provided stream.
public static Write ( Action stream, ulong value1 ) : void
stream Action a delegate to a write byte method
value1 ulong the value to write
리턴 void

WriteInt15() 공개 정적인 메소드

Writes the 7-bit encoded value to the provided stream.
public static WriteInt15 ( Action stream, short value1 ) : void
stream Action a delegate to a write byte method
value1 short the value to write
리턴 void