C# Класс GSF.Encoding7Bit

Contains 7 bit encoding functions
Показать файл Открыть проект

Открытые методы

Метод Описание
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