<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Compression",
  "identifier" : "/documentation/Compression/OutputFilter/write(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Compression"
    ],
    "preciseIdentifier" : "s:11Compression12OutputFilterC5writeyyxSgK10Foundation12DataProtocolRzlF"
  },
  "title" : "write(_:)"
}
-->

# write(_:)

Writes data to the output filter.

```
func write<D>(_ data: D?) throws where D : DataProtocol
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)