killnine commented on a change in pull request #9: [AMQNET-565] - .net standard 
conversion, project reorganization
URL: 
https://github.com/apache/activemq-nms-openwire/pull/9#discussion_r301776709
 
 

 ##########
 File path: src/CompressionPolicy.cs
 ##########
 @@ -16,24 +16,20 @@
  */
 
 using System.IO;
+using System.IO.Compression;
 
 namespace Apache.NMS.ActiveMQ
 {
-    /// <summary>
-    /// Default Compression policy for NMS.ActiveMQ uses the built in 
GZipStream
-    /// to compress and decompress the message body.  This is not compatible 
with
-    /// compression used by ActiveMQ so users should use this with caution.
-    /// </summary>
     public class CompressionPolicy : ICompressionPolicy
     {
         public Stream CreateCompressionStream(Stream data)
         {
-                       return new Ionic.Zlib.ZlibStream(data, 
Ionic.Zlib.CompressionMode.Compress);
+            return new GZipStream(data, CompressionMode.Compress);
 
 Review comment:
   Based on documentation from microsoft and [some information on 
SO](https://stackoverflow.com/questions/2599080/gzipstream-or-deflatestream-class),
 this should be sufficient. The comment above has me concerned. Why not just 
use GZipStream from the start? Was this some special functionality added for a 
different compression mode?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to