Ring buffer to read and write bits and bytes.
Пример #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="BitStream" /> class
 ///     with backing <paramref name="stream" />.  The stream will be closed only if
 ///     <paramref name="leaveOpen" /> is false.
 /// </summary>
 protected BitStream(Stream stream, bool leaveOpen)
 {
     BaseStream      = stream;
     _leaveOpen      = leaveOpen;
     BitBuffer       = new BitRingBuffer();
     TemporaryBuffer = new byte[0x100];
 }
Пример #2
0
		/// <summary>
		///     Initializes a new instance of the <see cref="BitStream" /> class
		///     with backing <paramref name="stream" />.  The stream will be closed only if
		///     <paramref name="leaveOpen" /> is false.
		/// </summary>
		protected BitStream(Stream stream, bool leaveOpen)
		{
			BaseStream = stream;
			_leaveOpen = leaveOpen;
			BitBuffer = new BitRingBuffer();
			TemporaryBuffer = new byte[0x100];
		}