---
title: finalize()
framework: compression
role: symbol
role_heading: Instance Method
path: compression/outputfilter/finalize()
---

# finalize()

Finalizes the stream by flushing all the remaining data in the stream.

## Declaration

```swift
func finalize() throws
```

## See Also

### Instance Methods

- [write(_:)](compression/outputfilter/write(_:).md)
