Class CompressedStreamWriter
Represents the compressed stream writer
Inheritance
Namespace: Syncfusion.Compression
Assembly: Syncfusion.DocIO.UWP.dll
Syntax
public class CompressedStreamWriter : Object
  Constructors
CompressedStreamWriter(Stream, CompressionLevel, Boolean)
Initializes compressor and writes ZLib header.
Declaration
public CompressedStreamWriter(Stream outputStream, CompressionLevel level, bool bCloseStream)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.Stream | outputStream | Output stream.  | 
      
| CompressionLevel | level | Compression level.  | 
      
| System.Boolean | bCloseStream | If true, output stream will be closed after the last block has been written.  | 
      
CompressedStreamWriter(Stream, Boolean)
Initializes compressor and writes ZLib header.
Declaration
public CompressedStreamWriter(Stream outputStream, bool bCloseStream)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.Stream | outputStream | Output stream.  | 
      
| System.Boolean | bCloseStream | If true, output stream will be closed after the last block has been written.  | 
      
CompressedStreamWriter(Stream, Boolean, CompressionLevel, Boolean)
Initializes compressor and writes ZLib header if needed.
Declaration
public CompressedStreamWriter(Stream outputStream, bool bNoWrap, CompressionLevel level, bool bCloseStream)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.Stream | outputStream | Output stream.  | 
      
| System.Boolean | bNoWrap | If true, ZLib header and checksum will not be written.  | 
      
| CompressionLevel | level | Compression level.  | 
      
| System.Boolean | bCloseStream | If true, output stream will be closed after the last block has been written.  | 
      
CompressedStreamWriter(Stream, Boolean, Boolean)
Initializes compressor and writes ZLib header if needed. Compression level is set to normal.
Declaration
public CompressedStreamWriter(Stream outputStream, bool bNoWrap, bool bCloseStream)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IO.Stream | outputStream | Output stream.  | 
      
| System.Boolean | bNoWrap | If true, ZLib header and checksum will not be written.  | 
      
| System.Boolean | bCloseStream | If true, output stream will be closed after the last block has been written.  | 
      
Fields
COMPR_FUNC
Internal compression engine constant
Declaration
public static int[] COMPR_FUNC
  Field Value
| Type | 
|---|
| System.Int32[] | 
GOOD_LENGTH
Internal compression engine constant
Declaration
public static int[] GOOD_LENGTH
  Field Value
| Type | 
|---|
| System.Int32[] | 
HASH_BITS
Internal compression engine constant
Declaration
public const int HASH_BITS = 15
  Field Value
| Type | 
|---|
| System.Int32 | 
HASH_MASK
Internal compression engine constant
Declaration
public const int HASH_MASK = 32767
  Field Value
| Type | 
|---|
| System.Int32 | 
HASH_SHIFT
Internal compression engine constant
Declaration
public const int HASH_SHIFT = 5
  Field Value
| Type | 
|---|
| System.Int32 | 
HASH_SIZE
Internal compression engine constant
Declaration
public const int HASH_SIZE = 32768
  Field Value
| Type | 
|---|
| System.Int32 | 
MAX_BLOCK_SIZE
Internal compression engine constant
Declaration
public static int MAX_BLOCK_SIZE
  Field Value
| Type | 
|---|
| System.Int32 | 
MAX_CHAIN
Internal compression engine constant
Declaration
public static int[] MAX_CHAIN
  Field Value
| Type | 
|---|
| System.Int32[] | 
MAX_DIST
Internal compression engine constant
Declaration
public const int MAX_DIST = 32506
  Field Value
| Type | 
|---|
| System.Int32 | 
MAX_LAZY
Internal compression engine constant
Declaration
public static int[] MAX_LAZY
  Field Value
| Type | 
|---|
| System.Int32[] | 
MAX_MATCH
Internal compression engine constant
Declaration
public const int MAX_MATCH = 258
  Field Value
| Type | 
|---|
| System.Int32 | 
MIN_LOOKAHEAD
Internal compression engine constant
Declaration
public const int MIN_LOOKAHEAD = 262
  Field Value
| Type | 
|---|
| System.Int32 | 
MIN_MATCH
Internal compression engine constant
Declaration
public const int MIN_MATCH = 3
  Field Value
| Type | 
|---|
| System.Int32 | 
NICE_LENGTH
Internal compression engine constant
Declaration
public static int[] NICE_LENGTH
  Field Value
| Type | 
|---|
| System.Int32[] | 
WMASK
Internal compression engine constant
Declaration
public const int WMASK = 32767
  Field Value
| Type | 
|---|
| System.Int32 | 
Properties
TotalIn
Total data processed.
Declaration
public int TotalIn { get; }
  Property Value
| Type | 
|---|
| System.Int32 | 
Methods
Close()
Declaration
public void Close()
  Write(Byte[], Int32, Int32, Boolean)
Compresses data and writes it to the stream.
Declaration
public void Write(byte[] data, int offset, int length, bool bCloseAfterWrite)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Byte[] | data | Data to compress  | 
      
| System.Int32 | offset | offset in data array  | 
      
| System.Int32 | length | length of data to compress  | 
      
| System.Boolean | bCloseAfterWrite | True - write last compress block in stream, otherwise False  |