---
title: getByteLength
---

# getByteLength

<a href="https://github.com/remix-run/remix/blob/remix@3.0.0-alpha.6/packages/lazy-file/src/lib/byte-range.ts#L24" target="_blank">View Source</a>

## Summary

Returns the length of the byte range in a buffer of the given `size`.

## Signature

```ts
function getByteLength(range: ByteRange, size: number): number;

```

## Params

### range

The byte range

### size

The total size of the buffer

## Returns

The length of the byte range