1. Jeff Hardy
  2. IronPython.Zlib

Source

IronPython.Zlib / src / Decompress.cs

Diff from to

File src/Decompress.cs

  • Ignore whitespace
 using ComponentAce.Compression.Libs.ZLib;
 using IronPython.Runtime;
 using IronPython.Runtime.Operations;
+using Microsoft.Scripting.Runtime;
 
 namespace IronPython.Zlib
 {
             return decompress(value, 0);
         }
 
+        [Documentation(@"decompress(data, max_length) -- Return a string containing the decompressed
+version of the data.
+
+After calling this function, some of the input data may still be stored in
+internal buffers for later processing.
+Call the flush() method to clear these buffers.
+If the max_length parameter is specified then the return value will be
+no longer than max_length.  Unconsumed input data will be stored in
+the unconsumed_tail attribute.")]
         public string decompress(string value, int max_length)
         {
             if(max_length < 0) throw new ArgumentException("max_length must be greater than zero");
             return ZlibModule.Latin1.GetString(output, 0, (int)(zst.total_out - start_total_out));
         }
 
+        [Documentation(@"flush( [length] ) -- Return a string containing any remaining
+decompressed data. length, if given, is the initial size of the
+output buffer.
+
+The decompressor object can no longer be used after this call.")]
         public string flush([DefaultParameterValue(ZlibModule.DEFAULTALLOC)]int length)
         {
             if(length < 1)
             return ZlibModule.Latin1.GetString(output, 0, (int)(zst.total_out - start_total_out));
         }
 
+        //[Documentation("copy() -- Return a copy of the decompression object.")]
         //public Compress copy()
         //{
         //    throw new NotImplementedException();