public static void Reset(ZStream /*!*/ self) { var zst = self.GetStream(); if (zst.IsInitialized) { int err = zst.reset(); Debug.Assert(err == Z_OK); } }
public static int SetAvailOut(ZStream /*!*/ self, int size) { long newBufferSize; var zst = self.GetStream(); if (size < 0 || (newBufferSize = zst.next_out_index + size) > Int32.MaxValue) { throw RubyExceptions.CreateArgumentError("negative string size (or size too big)"); } int old = zst.avail_out; // Make sure we have enough space in the buffer. // We could keep the buffer larger but since users are calling // this API explicitly they probably want to resize the buffer. var output = zst.next_out; Array.Resize(ref output, (int)newBufferSize); zst.next_out = output; zst.avail_out = size; return(old); }
public static object TotalOut(ZStream /*!*/ self) { return(Protocols.Normalize(self.GetStream().total_out)); }
public static int DataType(ZStream /*!*/ self) { return((int)self.GetStream().Data_type); }
public static int GetAvailOut(ZStream /*!*/ self) { return(self.GetStream().avail_out); }
public static int AvailIn(ZStream /*!*/ self) { return(self.GetStream().avail_in); }
public static object Adler(ZStream /*!*/ self) { return(Protocols.Normalize(self.GetStream().adler)); }