Xceed .NET Libraries Documentation
Xceed.Compression Assembly / Xceed.Compression Namespace / CompressedStream Class
Members


In This Topic
    CompressedStream Class
    In This Topic
    Pass-through stream that applies compression and decompression to an inner stream.
    Syntax
    'Declaration
     
    Public Class CompressedStream 
       Inherits System.IO.Stream
       Implements System.IDisposable 
    'Usage
     
    Dim instance As CompressedStream
    public class CompressedStream : System.IO.Stream, System.IDisposable  
    Remarks

    Compression is applied to data being written to the stream, and decompression is performed when data is read from the stream.

    The compression engine itself is not built into the CompressedStream class. Instead, user-supplied Compressor and Decompressor classes are used.

    It is possible to implement your own compression algorithm by implementing classes derived from Compressor and Decompressor.

    By default, closing the CompressedStream  will also close the inner stream. This behavior can be modified by setting the Transient property to true%.

    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.IO.Stream
             Xceed.Compression.CompressedStream

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyOverridden. Determines whether the inner stream supports reading AND the compressed stream supports data decompression.  
    Public PropertyOverridden. A CompressedStream object is not seekable.  
    Public Property (Inherited from System.IO.Stream)
    Public PropertyOverridden. Determines whether the inner stream supports writing AND the compressed stream supports data compression.  
    Public Property  
    Public Property  
    Public PropertyGets the System.IO.Stream that was passed when creating this CompressedStream.  
    Public PropertyOverridden. A CompressedStream object is not seekable.  
    Public PropertyOverridden. A CompressedStream object is not seekable.  
    Public Property (Inherited from System.IO.Stream)
    Public PropertyGets the negative byte offset at which the compressed data ends inside the last data buffer read by the object.  
    Public PropertyGets or sets a boolean value indicating if the stream is responsible for closing its inner stream.  
    Public Property (Inherited from System.IO.Stream)
    Top
    Public Methods
     NameDescription
    Public Method (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Methodstatic (Shared in Visual Basic)  
    Public Methodstatic (Shared in Visual Basic)  
    Public Methodstatic (Shared in Visual Basic)  
    Public Methodstatic (Shared in Visual Basic)  
    Public Methodstatic (Shared in Visual Basic)  
    Public Methodstatic (Shared in Visual Basic)  
    Public Methodstatic (Shared in Visual Basic)  
    Public Method (Inherited from System.MarshalByRefObject)
    Public Methodstatic (Shared in Visual Basic)  
    Public MethodOverloaded. Overridden. Provides correct cleanup of resources in the base class and its derived classes.  
    Public Method (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public MethodOverridden. Causes all pending compressed data to be written to the inner stream, and updates the underlying data source or repository of the inner stream with the current state of the buffer.  
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.MarshalByRefObject)
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodOverridden. Reads and decompresses a sequence of bytes from the inner stream.  
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Public MethodOverridden. A CompressedStream object is not seekable.  
    Public MethodOverridden. A CompressedStream object is not seekable.  
    Public Methodstatic (Shared in Visual Basic)Prepares PPMd compression using the specified Stream and compression level.  
    Public Methodstatic (Shared in Visual Basic)Prepares PPMd decompression using the specified Stream and compression level.  
    Public Methodstatic (Shared in Visual Basic)Determines whether a compression format will be used, based on a specified compression method and level.  
    Public MethodOverridden. Compresses and writes a sequence of bytes to the inner stream.  
    Public MethodOverloaded.  (Inherited from System.IO.Stream)
    Public Method (Inherited from System.IO.Stream)
    Top
    Protected Methods
     NameDescription
    Protected Method (Inherited from System.IO.Stream)
    Protected MethodAllows the CompressedStream object to attempt to free resources and perform other cleanup operations before it is reclaimed by garbage collection.  
    Protected MethodOverloaded.  (Inherited from System.MarshalByRefObject)
    Protected Method (Inherited from System.IO.Stream)
    Top
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also