C# Class DBreeze.Utils.Biser

Custom binary serializer of well known types
Show file Open project: hhblaze/DBreeze Class Usage Examples

Public Methods

Method Description
Decode_DICT_PROTO_STRING_BYTEARRAYHASHSET ( this encB, IDictionary retD, Compression compression = Compression.eCompressionMethod.NoCompression ) : void

Decodes byte[] into Dictionary [string, List[byte[]]]

Decode_DICT_PROTO_STRING_UINTHASHSET ( this encB, IDictionary retD, Compression compression = Compression.eCompressionMethod.NoCompression ) : void

Decodes byte[] into Dictionary [string, HashSet[uint]]

Decode_DICT_PROTO_UINT_BYTEARRAY ( this encB, byte[]>.IDictionary retD, Compression compression = Compression.eCompressionMethod.NoCompression ) : void

Used when parameter is encoded with Encode_DICT_PROTO_UINT_BYTEARRAY. Returns Dictionary [uint, byte[]]

Encode_DICT_PROTO_STRING_BYTEARRAYHASHSET ( this d, Compression compression = Compression.eCompressionMethod.NoCompression ) : byte[]

Proto encoding of Dictionary [string, List[byte[]]]. Hashset can be null, after decoding istantiated, zero-length hashset will be returned in this case.

Encode_DICT_PROTO_STRING_UINTHASHSET ( this d, Compression compression = Compression.eCompressionMethod.NoCompression ) : byte[]

Proto encoding of Dictionary [string, HashSet[uint]]. Hashset can be null, after decoding istantiated, zero-length hashset will be returned in this case.

Encode_DICT_PROTO_UINT_BYTEARRAY ( byte[]>.this d, Compression compression = Compression.eCompressionMethod.NoCompression ) : byte[]

Proto encoding of Dictionary [uint, byte[]]. Use when key is less then 4 bytes (less then 268mln). Value byte[0] will be presented as null after decoding

GetVarintBytes ( uint value ) : byte[]

Uses protobuf concepts

GetVarintBytes ( ulong value ) : byte[]

Uses protobuf concepts

ToUInt32 ( byte bytes ) : uint

Uses protobuf concepts

Private Methods

Method Description
ToTarget ( byte bytes, int sizeBites ) : ulong

ToTarget

Method Details

Decode_DICT_PROTO_STRING_BYTEARRAYHASHSET() public static method

Decodes byte[] into Dictionary [string, List[byte[]]]
public static Decode_DICT_PROTO_STRING_BYTEARRAYHASHSET ( this encB, IDictionary retD, Compression compression = Compression.eCompressionMethod.NoCompression ) : void
encB this
retD IDictionary
compression Compression
return void

Decode_DICT_PROTO_STRING_UINTHASHSET() public static method

Decodes byte[] into Dictionary [string, HashSet[uint]]
public static Decode_DICT_PROTO_STRING_UINTHASHSET ( this encB, IDictionary retD, Compression compression = Compression.eCompressionMethod.NoCompression ) : void
encB this
retD IDictionary
compression Compression
return void

Decode_DICT_PROTO_UINT_BYTEARRAY() public static method

Used when parameter is encoded with Encode_DICT_PROTO_UINT_BYTEARRAY. Returns Dictionary [uint, byte[]]
public static Decode_DICT_PROTO_UINT_BYTEARRAY ( this encB, byte[]>.IDictionary retD, Compression compression = Compression.eCompressionMethod.NoCompression ) : void
encB this
retD byte[]>.IDictionary Instantiated Dictionary must be supplied and will be returned filled
compression Compression compression method supplied by Encode_DICT_PROTO_UINT_BYTEARRAY
return void

Encode_DICT_PROTO_STRING_BYTEARRAYHASHSET() public static method

Proto encoding of Dictionary [string, List[byte[]]]. Hashset can be null, after decoding istantiated, zero-length hashset will be returned in this case.
public static Encode_DICT_PROTO_STRING_BYTEARRAYHASHSET ( this d, Compression compression = Compression.eCompressionMethod.NoCompression ) : byte[]
d this
compression Compression
return byte[]

Encode_DICT_PROTO_STRING_UINTHASHSET() public static method

Proto encoding of Dictionary [string, HashSet[uint]]. Hashset can be null, after decoding istantiated, zero-length hashset will be returned in this case.
public static Encode_DICT_PROTO_STRING_UINTHASHSET ( this d, Compression compression = Compression.eCompressionMethod.NoCompression ) : byte[]
d this
compression Compression
return byte[]

Encode_DICT_PROTO_UINT_BYTEARRAY() public static method

Proto encoding of Dictionary [uint, byte[]]. Use when key is less then 4 bytes (less then 268mln). Value byte[0] will be presented as null after decoding
public static Encode_DICT_PROTO_UINT_BYTEARRAY ( byte[]>.this d, Compression compression = Compression.eCompressionMethod.NoCompression ) : byte[]
d byte[]>.this
compression Compression compression method extra applied to the outgoing byte array
return byte[]

GetVarintBytes() public static method

Uses protobuf concepts
public static GetVarintBytes ( uint value ) : byte[]
value uint
return byte[]

GetVarintBytes() public static method

Uses protobuf concepts
public static GetVarintBytes ( ulong value ) : byte[]
value ulong
return byte[]

ToUInt32() public static method

Uses protobuf concepts
public static ToUInt32 ( byte bytes ) : uint
bytes byte
return uint