// This ctor is private - no validation is done here. This is to allow the use // of a (specific) negative value for the _lengthLimit, to indicate that there // is no length set. So we validate the length limit in those ctors that use an // explicit param, otherwise we don't validate, because it could be our special // value. private CrcCalculatorStream(bool leaveOpen, long length, Stream stream) { this.innerStream = stream; this.crc32 = new Crc32(); this.lengthLimit = length; this.LeaveOpen = leaveOpen; }
public ZlibBaseStream(Stream stream, ZlibStreamFlavor flavor, bool leaveOpen) { this.FlushMode = FlushType.None; //_workingBuffer = new byte[WORKING_BUFFER_SIZE_DEFAULT]; this.Stream = stream; this.LeaveOpen = leaveOpen; this.Flavor = flavor; // workitem 7159 if (flavor == ZlibStreamFlavor.Gzip) { this.crc = new Crc32(); } }