/// <summary>
 ///     Initialises an <see cref="ArithmeticCodingWriterStream"/> instance given an output stream and a set of byte
 ///     frequencies.</summary>
 /// <param name="outputStream">
 ///     The output stream to which the encoded data will be written.</param>
 /// <param name="context">
 ///     The context used for determining the relative frequencies of input bytes. The caller may make changes to the
 ///     context instance it passed in; such changes will take effect immediately. See also <see cref="SetContext"/>.</param>
 /// <remarks>
 ///     The encoded data will not be complete until the stream is closed using <see cref="Close()"/>.</remarks>
 public ArithmeticCodingWriterStream(Stream outputStream, ArithmeticSymbolContext context)
 {
     _writer = new ArithmeticCodingWriter(
         outputStream ?? throw new ArgumentNullException(nameof(outputStream)),
         context ?? throw new ArgumentNullException(nameof(context))
         );
 }
 /// <summary>
 ///     Initialises an <see cref="ArithmeticCodingReaderStream"/> instance given an input stream and a set of byte
 ///     frequencies.</summary>
 /// <param name="inputStream">
 ///     The input stream from which the encoded data will be read.</param>
 /// <param name="context">
 ///     The context used for determining the relative frequencies of input bytes. The caller may make changes to the
 ///     context instance it passed in; such changes will take effect immediately. See also <see cref="SetContext"/>.</param>
 public ArithmeticCodingReaderStream(Stream inputStream, ArithmeticSymbolContext context)
 {
     _reader = new ArithmeticCodingReader(
         inputStream ?? throw new ArgumentNullException(nameof(inputStream)),
         context ?? throw new ArgumentNullException(nameof(context))
         );
 }