ComponentOne Zip for UWP
C1.UWP.Zip Assembly / C1.C1Zip Namespace / C1ZStreamReader Class
Members Example

In This Topic
    C1ZStreamReader Class
    In This Topic
    Decompresses data from .NET streams.
    Object Model
    C1ZStreamReader Class
    Syntax
    'Declaration
     
    Public Class C1ZStreamReader 
       Inherits System.IO.Stream
    public class C1ZStreamReader : System.IO.Stream 
    Remarks

    To decompress data from a compressed stream, create a C1ZStreamReader object passing the compressed stream to the C1ZStreamReader constructor.

    Then read the data from the C1ZStreamReader using the Read method, or create a System.IO.StreamReader on the C1ZStreamReader. The second option is indicated when you want to read formatted data.

    Example
    The code below decompresses a string that was stored into a memory stream object:
    public string ExpandString(byte[] buffer)
    {
    	// turn buffer into a memory stream
    	var ms = new MemoryStream(buffer);
    	
    	// attach decompressor stream to memory stream
    	var sr = new C1ZStreamReader(ms);
    	
    	// read uncompressed data
    	var reader = new StreamReader(sr);
    	return reader.ReadToEnd();
    }
    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.IO.Stream
             C1.C1Zip.C1ZStreamReader

    See Also