C# Class Paymetheus.Bitcoin.Util.CompactInt

Show file Open project: btcsuite/Paymetheus Class Usage Examples

Public Methods

Method Description
ReadCompact ( byte source, int offset, int &bytesRead ) : ulong
SerializeSize ( ulong value ) : int
WriteCompact ( byte destination, int offset, ulong value ) : int

Writes the compact encoding of value to a destination byte array, starting at offset.

Private Methods

Method Description
CanonicalCheck ( ulong value, ulong minValue, byte discriminant ) : ulong

Method Details

ReadCompact() public static method

public static ReadCompact ( byte source, int offset, int &bytesRead ) : ulong
source byte
offset int
bytesRead int
return ulong

SerializeSize() public static method

public static SerializeSize ( ulong value ) : int
value ulong
return int

WriteCompact() public static method

Writes the compact encoding of value to a destination byte array, starting at offset.
public static WriteCompact ( byte destination, int offset, ulong value ) : int
destination byte
offset int
value ulong
return int