---
title: "bytes"
description: "Certify a byte stream for direct Response body pass-through."
url: "https://next.elysiajs.com/reference/functions/bytes/"
---

# bytes

```ts
function bytes<T>(stream): T;
```

Defined in: elysia/dist/utils.d.ts:155

Certify a byte stream for direct Response body pass-through.

The returned Response owns this exact stream. Cancel it through the response body reader; preserving identity means Elysia does not install a second request-signal reader after the body is locked.

## Type Parameters

| Type Parameter                                                  |
| --------------------------------------------------------------- |
| `T` *extends* `ReadableStream`<`Uint8Array`<`ArrayBufferLike`>> |

## Parameters

| Parameter | Type |
| --------- | ---- |
| `stream`  | `T`  |

## Returns

`T`
