Example #1
0
        private void SetDeflateStreamFileFormatter(CompressionMode mode)
        {
            if (mode == CompressionMode.Compress)
            {
                IFileFormatWriter fileFormatWriter = new GZipFormatter();
                this.deflateStream.SetFileFormatWriter(fileFormatWriter);
                return;
            }
            IFileFormatReader fileFormatReader = new GZipDecoder();

            this.deflateStream.SetFileFormatReader(fileFormatReader);
        }
Example #2
0
 private void SetDeflateStreamFileFormatter(CompressionMode mode)
 {
     if (mode == CompressionMode.Compress)
     {
         IFileFormatWriter writeCommand = new GZipFormatter();
         deflateStream.SetFileFormatWriter(writeCommand);
     }
     else
     {
         IFileFormatReader readCommand = new GZipDecoder();
         deflateStream.SetFileFormatReader(readCommand);
     }
 }
Example #3
0
        private void SetDeflateStreamFileFormatter(CompressionMode mode) {

            if (mode == CompressionMode.Compress) {

                IFileFormatWriter writeCommand = new GZipFormatter();
                deflateStream.SetFileFormatWriter(writeCommand);

            } else {

                IFileFormatReader readCommand = new GZipDecoder();
                deflateStream.SetFileFormatReader(readCommand);
            }
        }