<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppleArchive",
  "identifier" : "/documentation/AppleArchive/ArchiveByteStream/customStream(instance:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Apple Archive",
      "AppleArchive"
    ],
    "preciseIdentifier" : "s:12AppleArchive0B10ByteStreamC06customD08instanceACSgx_tRlzCAA0bcD8ProtocolRzlFZ"
  },
  "title" : "customStream(instance:)"
}
-->

# customStream(instance:)

Returns a new archive byte stream instance mapped to an object that conforms to the archive byte stream protocol.

```
static func customStream<C>(instance: C) -> ArchiveByteStream? where C : AnyObject, C : ArchiveByteStreamProtocol
```

## Parameters

`instance`

The object that the new archive stream wraps.

## Return Value

A new archive byte stream.

---

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)