Exemple #1
0
 /// <summary> Resets the MQ decoder to start a new segment. This is like recreating a
 /// new MQDecoder object with new input data.
 ///
 /// </summary>
 /// <param name="buf">The byte array containing the MQ encoded data. If null the
 /// current byte array is assumed.
 ///
 /// </param>
 /// <param name="off">The index of the first element in 'buf' to be decoded. If
 /// negative the byte just after the previous segment is assumed, only
 /// valid if 'buf' is null.
 ///
 /// </param>
 /// <param name="len">The number of bytes in 'buf' to be decoded. Any subsequent
 /// bytes are taken to be 0xFF.
 ///
 /// </param>
 public void  nextSegment(byte[] buf, int off, int len)
 {
     // Set the new input
     in_Renamed.setByteArray(buf, off, len);
     // Reinitialize MQ
     init();
 }
 /// <summary> Resets the underlying byte input to start a new segment. The bit buffer
 /// is flushed.
 ///
 /// </summary>
 /// <param name="buf">The byte array containing the byte data. If null the
 /// current byte array is assumed.
 ///
 /// </param>
 /// <param name="off">The index of the first element in 'buf' to be decoded. If
 /// negative the byte just after the previous segment is assumed, only
 /// valid if 'buf' is null.
 ///
 /// </param>
 /// <param name="len">The number of bytes in 'buf' to be decoded. Any subsequent
 /// bytes are taken to be 0xFF.
 ///
 /// </param>
 internal void  setByteArray(byte[] buf, int off, int len)
 {
     in_Renamed.setByteArray(buf, off, len);
     bbuf = 0;             // reset any bit stuffing state
     bpos = -1;
 }