---
title: "customStream(instance:)"
framework: applearchive
role: symbol
role_heading: Type Method
path: "applearchive/archivebytestream/customstream(instance:)"
---

# customStream(instance:)

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

## Declaration

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

## Parameters

- `instance`: The object that the new archive stream wraps.

## Return Value

Return Value A new archive byte stream.

## See Also

### Streaming with Custom Streams

- [withStream(wrapping:_:)](applearchive/archivebytestream/withstream(wrapping:_:).md)
- [sharedBufferPipe(capacity:)](applearchive/archivebytestream/sharedbufferpipe(capacity:).md)
