diff --git a/mpir.net/mpir.net/HugeInt.h b/mpir.net/mpir.net/HugeInt.h
index e1aff351..638e92b7 100644
--- a/mpir.net/mpir.net/HugeInt.h
+++ b/mpir.net/mpir.net/HugeInt.h
@@ -1743,6 +1743,27 @@ namespace MPIR
/// The number of digits the number would take written in the specified base, possibly 1 too big, not counting a leading minus.
mp_size_t ApproximateSizeInBase(int base) { return mpz_sizeinbase(_value, base); }
+ ///
+ /// Output the integer to the in raw binary format.
+ /// The number is written in a portable format, with 4 bytes of size information, and that many bytes of limbs.
+ /// Both the size and the limbs are written in decreasing significance order (i.e., in big-endian).
+ /// The output can be read with Read(Stream).
+ /// The output cannot be read by mpz_inp_raw from GMP 1, because of changes necessary
+ /// for compatibility between 32-bit and 64-bit machines.
+ ///
+ /// Stream to output the number to
+ void Write(Stream^ stream);
+
+ ///
+ /// Reads the integer value from the in raw binary format, as it would have been written by Write(Stream).
+ /// The number is read in a portable format, with 4 bytes of size information, and that many bytes of limbs.
+ /// Both the size and the limbs are written in decreasing significance order (i.e., in big-endian).
+ /// This routine can read the output from mpz_out_raw also from GMP 1, in spite of changes
+ /// necessary for compatibility between 32-bit and 64-bit machines.
+ ///
+ /// Stream to input the number from
+ void Read(Stream^ stream);
+
#pragma endregion
#pragma region IO