Ejemplo n.º 1
0
 public VarIntPacker(ulong smallValue, ulong mediumValue, ulong largeValue, bool throwIfOverLarge = true)
     : this(BitHelper.BitCount(smallValue), BitHelper.BitCount(mediumValue), BitHelper.BitCount(largeValue), throwIfOverLarge)
 {
 }
Ejemplo n.º 2
0
 /// <param name="max"></param>
 /// <param name="lowestPrecision">lowest precision, actual precision will be caculated from number of bits used</param>
 public FloatPacker(float max, float lowestPrecision) : this(max, BitHelper.BitCount(max, lowestPrecision))
 {
 }
Ejemplo n.º 3
0
 public VarIntPacker(ulong smallValue, ulong mediumValue)
     : this(BitHelper.BitCount(smallValue), BitHelper.BitCount(mediumValue), 64, false)
 {
 }
Ejemplo n.º 4
0
 /// <param name="max"></param>
 /// <param name="lowestPrecision">lowest precision, actual precision will be caculated from number of bits used</param>
 /// <param name="signed">if negative values will be allowed or not</param>
 public FloatPacker(float max, float lowestPrecision, bool signed) : this(max, BitHelper.BitCount(max, lowestPrecision, signed), signed)
 {
 }