---
title: "availableLength(at:)"
framework: MediaExtension
role: symbol
role_heading: Instance Method
platforms: [macOS 14.0+]
path: "mediaextension/mebytesource/availablelength(at:)"
---

# availableLength(at:)

Gets the number of available bytes from the offset within the byte source.

## Declaration

```swift
func availableLength(at offset: Int64) -> Int64
```

## Parameters

- `offset`: The offset in bytes from the beginning of the byte source.

## Return Value

Return Value An integer that specifies the number of available bytes.

## See Also

### Performing operations on a byte source

- [byteSourceForRelatedFileName(_:)](mediaextension/mebytesource/bytesourceforrelatedfilename(_:).md)
- [read(length:from:completionHandler:)](mediaextension/mebytesource/read(length:from:completionhandler:).md)
