NevronOpenVision
Nevron.Nov.Compression Namespace / NCompression Class / CompressZlib Method / CompressZlib(Stream,Stream,ENCompressionLevel,Boolean) Method
The stream that contains the data to compress.
The stream to write the compressed data to.
The compression level to apply.
Determines whether to close the output stream when the compression has finished or not.
In This Topic
    CompressZlib(Stream,Stream,ENCompressionLevel,Boolean) Method
    In This Topic
    Compresses the given input stream with the zlib algorithm to the specified output stream.
    Syntax
    public static void CompressZlib( 
       System.IO.Stream input,
       System.IO.Stream output,
       ENCompressionLevel compressionLevel,
       System.bool closeOutputStream
    )

    Parameters

    input
    The stream that contains the data to compress.
    output
    The stream to write the compressed data to.
    compressionLevel
    The compression level to apply.
    closeOutputStream
    Determines whether to close the output stream when the compression has finished or not.
    Remarks
    The zlib algorithm is an abstraction of the deflate algorithm used by the gzip compression and has become very popular because of its great performance. It is used in many file formats such as ZIP, PNG, PDF, flash movies (SWF), etc. and is a crucial part of many platforms like Linux, Mac OS X, iOS, XBox, Playstation, Wii and so on.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also