---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/ZDeflaterOutputStream
---

# ZDeflaterOutputStream

## Overview

`ZDeflaterOutputStream` is a class in Aspose.PDF FOSS for .NET.
Inherits from: `Stream`.

zlib (RFC 1950) deflating output stream — a public helper matching the Aspose.PDF for .NET surface.

This class provides 7 methods for working with ZDeflaterOutputStream objects in .NET programs.
Available methods include: `Finish`, `Flush`, `Read`, `Seek`, `SetLength`, `Write`, `ZDeflaterOutputStream`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `CanRead`, `CanSeek`, `CanWrite`, `Length`, `Position`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `CanRead` | `bool` | Read | Gets the can read. |
| `CanSeek` | `bool` | Read | Gets the can seek. |
| `CanWrite` | `bool` | Read | Gets the can write. |
| `Length` | `long` | Read | Gets the length. |
| `Position` | `long` | Read/Write | Gets or sets the position. |

## Methods

| Signature | Description |
|-----------|-------------|
| `ZDeflaterOutputStream(destination: Stream)` | Wrap destination for zlib compression. |
| `Finish()` | Flush remaining compressed data and write the zlib trailer. |
| `Write(buffer: byte[], offset: int, count: int)` | Calls Write(buffer, offset, count) on this ZDeflaterOutputStream instance. |
| `Flush()` | Calls Flush on this ZDeflaterOutputStream instance. |
| `Read(buffer: byte[], offset: int, count: int)` | Calls Read(buffer, offset, count) on this ZDeflaterOutputStream instance. |
| `Seek(offset: long, origin: SeekOrigin)` | Calls Seek(offset, origin) on this ZDeflaterOutputStream instance. |
| `SetLength(value: long)` | Sets the length value. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)