/// <summary> /// Append a specified Init32 type value into the buffer with the specified bit length. /// </summary> /// <param name="value">Specify the value which needs to be appended.</param> /// <param name="length">Specify the bit length which the value will occupy in the buffer.</param> public void AppendInit32(int value, int length) { byte[] convertedBytes = LittleEndianBitConverter.GetBytes(value); this.SetBytes(convertedBytes, length); }
/// <summary> /// Append a specified Unit64 type value into the buffer with the specified bit length. /// </summary> /// <param name="value">Specify the value which needs to be appended.</param> /// <param name="length">Specify the bit length which the value will occupy in the buffer.</param> public void AppendUInt64(ulong value, int length) { byte[] convertedBytes = LittleEndianBitConverter.GetBytes(value); this.SetBytes(convertedBytes, length); }