SetDictionary() public method

Set compression dictionary
public SetDictionary ( byte buffer, int offset, int length ) : void
buffer byte The buffer containing the dictionary data
offset int The offset in the buffer for the first byte of data
length int The length of the dictionary data.
return void
Beispiel #1
0
 public void SetDictionary(byte[] dictionary, int index, int count)
 {
     if (state != 0)
     {
         throw new InvalidOperationException();
     }
     state = 1;
     engine.SetDictionary(dictionary, index, count);
 }
Beispiel #2
0
        /// <summary>
        /// Sets the dictionary which should be used in the deflate process.
        /// The dictionary should be a byte array containing strings that are
        /// likely to occur in the data which should be compressed.  The
        /// dictionary is not stored in the compressed output, only a
        /// checksum.  To decompress the output you need to supply the same
        /// dictionary again.
        /// </summary>
        /// <param name="dict">
        /// the dictionary.
        /// </param>
        /// <param name="offset">
        /// an offset into the dictionary.
        /// </param>
        /// <param name="length">
        /// the length of the dictionary.
        /// </param>
        /// <exception cref="System.InvalidOperationException">
        /// if setInput () or deflate () were already called or another dictionary was already set.
        /// </exception>
        public void SetDictionary(byte[] dict, int offset, int length)
        {
            if (state != INIT_STATE)
            {
                throw new InvalidOperationException();
            }

            state = SETDICT_STATE;
            engine.SetDictionary(dict, offset, length);
        }
Beispiel #3
0
 public void SetDictionary(byte[] dictionary, int index, int count)
 {
     //IL_0008: Unknown result type (might be due to invalid IL or missing references)
     if (state != 0)
     {
         throw new InvalidOperationException();
     }
     state = 1;
     engine.SetDictionary(dictionary, index, count);
 }
Beispiel #4
0
        /// <summary>
        /// Sets the dictionary which should be used in the deflate process.
        /// The dictionary is a byte array containing strings that are
        /// likely to occur in the data which should be compressed.  The
        /// dictionary is not stored in the compressed output, only a
        /// checksum.  To decompress the output you need to supply the same
        /// dictionary again.
        /// </summary>
        /// <param name="dictionary">
        /// The dictionary data
        /// </param>
        /// <param name="index">
        /// The index where dictionary information commences.
        /// </param>
        /// <param name="count">
        /// The number of bytes in the dictionary.
        /// </param>
        /// <exception cref="System.InvalidOperationException">
        /// If SetInput () or Deflate() were already called or another dictionary was already set.
        /// </exception>
        public void SetDictionary(byte[] dictionary, int index, int count)
        {
            if (state != INIT_STATE)
            {
                throw new InvalidOperationException();
            }

            state = SETDICT_STATE;
            engine.SetDictionary(dictionary, index, count);
        }