/// <summary> /// Sets the input. This should only be called, if needsInput() /// returns true. /// </summary> /// <param name="buffer"> /// The source of input data /// </param> /// <param name="index"> /// The index into buffer where the input starts. /// </param> /// <param name="count"> /// The number of bytes of input to use. /// </param> /// <exception cref="InvalidOperationException"> /// No input is needed. /// </exception> /// <exception cref="ArgumentOutOfRangeException"> /// The index and/or count are wrong. /// </exception> public void SetInput(byte[] buffer, int index, int count) { input.SetInput(buffer, index, count); totalIn += count; }
/// <summary> /// Sets the input. This should only be called, if needsInput() /// returns true. /// </summary> /// <param name="buffer"> /// The source of input data /// </param> /// <param name="offset"> /// The offset into buffer where the input starts. /// </param> /// <param name="length"> /// The number of bytes of input to use. /// </param> /// <exception cref="System.InvalidOperationException"> /// No input is needed. /// </exception> /// <exception cref="System.ArgumentOutOfRangeException"> /// The off and/or len are wrong. /// </exception> public void SetInput(byte[] buffer, int offset, int length) { input.SetInput(buffer, offset, length); totalIn += length; }
/// <summary> /// Check the stream header which is returend from the server. /// </summary> /// <param name="value">The value as an array of <see cref="byte"/></param> /// <returns>wheater is input is compressed [true] or its not compressed [false]</returns> public static bool CheckHeader(byte[] value) { #region Access Log #if TRACE { Handler.LogHandler.Tracking("Access Method: " + typeof(Compression).FullName + "->" + ((object)MethodBase.GetCurrentMethod()).ToString() + " ;"); } #endif #endregion Access Log MemoryStream ms = new MemoryStream(value); StreamManipulator input = new StreamManipulator(); input.SetInput(value, 0, value.Length); return DecodeHeader(input); }
/// <summary> /// Sets the input. This should only be called, if needsInput() /// returns true. /// </summary> /// <param name="buf"> /// the input. /// </param> /// <param name="off"> /// the offset into buffer where the input starts. /// </param> /// <param name="len"> /// the length of the input. /// </param> /// <exception cref="System.InvalidOperationException"> /// if no input is needed. /// </exception> /// <exception cref="System.ArgumentOutOfRangeException"> /// if the off and/or len are wrong. /// </exception> public void SetInput(byte[] buf, int off, int len) { input.SetInput(buf, off, len); totalIn += len; }
/// <summary> /// Sets the input. This should only be called, if needsInput() /// returns true. /// </summary> /// <param name="buffer"> /// The source of input data /// </param> /// <param name="index"> /// The index into buffer where the input starts. /// </param> /// <param name="count"> /// The number of bytes of input to use. /// </param> /// <exception cref="InvalidOperationException"> /// No input is needed. /// </exception> /// <exception cref="ArgumentOutOfRangeException"> /// The index and/or count are wrong. /// </exception> public void SetInput(ReadOnlyMemory <byte> buffer, int index, int count) { input.SetInput(buffer, index, count); totalIn += count; }