A `Blob` encapsulates immutable, raw data that can be safely shared across multiple worker threads.

since

  v15.7.0

experimental

### Hierarchy

- Blob

## Index

### Constructors

- constructor

### Properties

- size
- type

### Methods

- arrayBuffer
- slice
- stream
- text

## Constructors

### constructor

- new Blob(sources: (Blob | BinaryLike)[], options?: BlobOptions): Blob

- Creates a new `Blob` object containing a concatenation of the given sources.

  {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into the 'Blob' and can therefore be safely modified after the 'Blob' is created.

  String sources are also copied into the `Blob`.

  #### Parameters

  - ##### sources: (Blob | BinaryLike)[]

  - ##### Optional options: BlobOptions

  #### Returns Blob

## Properties

### Readonly size

size: number

The total size of the `Blob` in bytes.

since

  v15.7.0

### Readonly type

type: string

The content-type of the `Blob`.

since

  v15.7.0

## Methods

### arrayBuffer

- arrayBuffer(): Promise<ArrayBuffer>

- Returns a promise that fulfills with an ArrayBuffer containing a copy of the `Blob` data.

  since

    v15.7.0

  #### Returns Promise<ArrayBuffer>

### slice

- slice(start?: number, end?: number, type?: string): Blob

- Creates and returns a new `Blob` containing a subset of this `Blob` objects data. The original `Blob` is not altered.

  since

    v15.7.0

  #### Parameters

  - ##### Optional start: number

    The starting index.

  - ##### Optional end: number

    The ending index.

  - ##### Optional type: string

    The content-type for the new `Blob`

  #### Returns Blob

### stream

- stream(): unknown

- Returns a new `ReadableStream` that allows the content of the `Blob` to be read.

  since

    v16.7.0

  #### Returns unknown

### text

- text(): Promise<string>

- Returns a promise that fulfills with the contents of the `Blob` decoded as a UTF-8 string.

  since

    v15.7.0

  #### Returns Promise<string>

Generated using TypeDoc