Quantcast
Channel: sharpcompress Discussions Rss Feed
Viewing all articles
Browse latest Browse all 239

New Post: Suggestion: implicitly convert CompressionType to CompressionInfo

$
0
0

I'd like to suggest to add the following to CompressionInfo:

public static implicit operator CompressionInfo(CompressionType compressionType) { return new CompressionInfo() { Type = compressionType }; }

This would allow to write e.g.

writableArchive.SaveTo(stream, compressionType);

instead of

writableArchive.SaveTo(stream, new CompressionInfo { Type = compressionType });

while retaining the flexibility introduced with CompressionInfo.


Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>