Using (var reader = new StreamReader (decompressing)) Using (var decompressing = new CompressionStream (backing, CompressionMode.Decompress, CompressionAlgorithm.Zlib)) // create decompression stream with the correct algorithm Using (var backing = new MemoryStream (compressed_data)) // compress data to read To the API found in the System.IO.Compression.DeflateStream API: // sample zlib data The following sample shows how to decompress data with the compression framework, which is similar The normal patterns used in other IO APIs within. This API means that to compress data, the developer can use The compression framework uses a stream API in Xamarin.iOS and Xamarin.Mac. This reduces external dependencies and ensures that the compression operations will be supported on all platforms (as long as they meet the minimum OS requirements). Using the compression framework allows developers to perform compression operations without any third-party libraries or NuGets. The compression framework provides support for the following algorithms: The compression framework allows developers to interact with the compress and decompressed data as if they are normal streams without the need to use callbacks or delegates. Xamarin.iOS provides this framework following the Stream API. Xamarin apps targeting iOS 9.0 or macOS 10.11 (and newer) can use the Compression Framework to compress (encode) and decompress (decode) data.
0 Comments
Leave a Reply. |