C# 클래스 System.VarintBitConverter

파일 보기 프로젝트 열기: topas/VarintBitConverter

공개 메소드들

메소드 설명
GetVarintBytes ( byte value ) : byte[]

Returns the specified byte value as varint encoded array of bytes.

GetVarintBytes ( int value ) : byte[]

Returns the specified 32-bit signed value as varint encoded array of bytes.

GetVarintBytes ( long value ) : byte[]

Returns the specified 64-bit signed value as varint encoded array of bytes.

GetVarintBytes ( short value ) : byte[]

Returns the specified 16-bit signed value as varint encoded array of bytes.

GetVarintBytes ( uint value ) : byte[]

Returns the specified 32-bit unsigned value as varint encoded array of bytes.

GetVarintBytes ( ulong value ) : byte[]

Returns the specified 64-bit unsigned value as varint encoded array of bytes.

GetVarintBytes ( ushort value ) : byte[]

Returns the specified 16-bit unsigned value as varint encoded array of bytes.

ToByte ( byte bytes ) : byte

Returns byte value from varint encoded array of bytes.

ToInt16 ( byte bytes ) : short

Returns 16-bit signed value from varint encoded array of bytes.

ToInt32 ( byte bytes ) : int

Returns 32-bit signed value from varint encoded array of bytes.

ToInt64 ( byte bytes ) : long

Returns 64-bit signed value from varint encoded array of bytes.

ToUInt16 ( byte bytes ) : ushort

Returns 16-bit usigned value from varint encoded array of bytes.

ToUInt32 ( byte bytes ) : uint

Returns 32-bit unsigned value from varint encoded array of bytes.

ToUInt64 ( byte bytes ) : ulong

Returns 64-bit unsigned value from varint encoded array of bytes.

비공개 메소드들

메소드 설명
DecodeZigZag ( ulong value ) : long
EncodeZigZag ( long value, int bitLength ) : long
ToTarget ( byte bytes, int sizeBites ) : ulong

메소드 상세

GetVarintBytes() 공개 정적인 메소드

Returns the specified byte value as varint encoded array of bytes.
public static GetVarintBytes ( byte value ) : byte[]
value byte Byte value
리턴 byte[]

GetVarintBytes() 공개 정적인 메소드

Returns the specified 32-bit signed value as varint encoded array of bytes.
public static GetVarintBytes ( int value ) : byte[]
value int 32-bit signed value
리턴 byte[]

GetVarintBytes() 공개 정적인 메소드

Returns the specified 64-bit signed value as varint encoded array of bytes.
public static GetVarintBytes ( long value ) : byte[]
value long 64-bit signed value
리턴 byte[]

GetVarintBytes() 공개 정적인 메소드

Returns the specified 16-bit signed value as varint encoded array of bytes.
public static GetVarintBytes ( short value ) : byte[]
value short 16-bit signed value
리턴 byte[]

GetVarintBytes() 공개 정적인 메소드

Returns the specified 32-bit unsigned value as varint encoded array of bytes.
public static GetVarintBytes ( uint value ) : byte[]
value uint 32-bit unsigned value
리턴 byte[]

GetVarintBytes() 공개 정적인 메소드

Returns the specified 64-bit unsigned value as varint encoded array of bytes.
public static GetVarintBytes ( ulong value ) : byte[]
value ulong 64-bit unsigned value
리턴 byte[]

GetVarintBytes() 공개 정적인 메소드

Returns the specified 16-bit unsigned value as varint encoded array of bytes.
public static GetVarintBytes ( ushort value ) : byte[]
value ushort 16-bit unsigned value
리턴 byte[]

ToByte() 공개 정적인 메소드

Returns byte value from varint encoded array of bytes.
public static ToByte ( byte bytes ) : byte
bytes byte Varint encoded array of bytes.
리턴 byte

ToInt16() 공개 정적인 메소드

Returns 16-bit signed value from varint encoded array of bytes.
public static ToInt16 ( byte bytes ) : short
bytes byte Varint encoded array of bytes.
리턴 short

ToInt32() 공개 정적인 메소드

Returns 32-bit signed value from varint encoded array of bytes.
public static ToInt32 ( byte bytes ) : int
bytes byte Varint encoded array of bytes.
리턴 int

ToInt64() 공개 정적인 메소드

Returns 64-bit signed value from varint encoded array of bytes.
public static ToInt64 ( byte bytes ) : long
bytes byte Varint encoded array of bytes.
리턴 long

ToUInt16() 공개 정적인 메소드

Returns 16-bit usigned value from varint encoded array of bytes.
public static ToUInt16 ( byte bytes ) : ushort
bytes byte Varint encoded array of bytes.
리턴 ushort

ToUInt32() 공개 정적인 메소드

Returns 32-bit unsigned value from varint encoded array of bytes.
public static ToUInt32 ( byte bytes ) : uint
bytes byte Varint encoded array of bytes.
리턴 uint

ToUInt64() 공개 정적인 메소드

Returns 64-bit unsigned value from varint encoded array of bytes.
public static ToUInt64 ( byte bytes ) : ulong
bytes byte Varint encoded array of bytes.
리턴 ulong