Function
Static Public Summary | ||
public |
blobToArrayBuffer(blob: Blob, chunk: Number): Promise<ArrayBuffer> Convert a blob to an ArrayBuffer |
version 1.0.0 since 1.0.0 |
public |
blobToBinaryString(blob: Blob, chunk: Number): Promise<String> Convert a blob to a binary string |
version 1.0.0 since 1.0.0 |
public |
compareBuffers(buf1: ArrayBuffer, buf2: ArrayBuffer): Boolean Compares two buffers byte to byte |
version 1.0.0 since 1.0.0 |
Static Public
public blobToArrayBuffer(blob: Blob, chunk: Number): Promise<ArrayBuffer> version 1.0.0 since 1.0.0 source
import {blobToArrayBuffer} from 'blob-compare/src/lib.js'
Convert a blob to an ArrayBuffer
The blob can optionnally be sliced with the size
argument
Params:
Name | Type | Attribute | Description |
blob | Blob | Blob |
|
chunk | Number | Size in bytes to slice blob |
public blobToBinaryString(blob: Blob, chunk: Number): Promise<String> version 1.0.0 since 1.0.0 source
import {blobToBinaryString} from 'blob-compare/src/lib.js'
Convert a blob to a binary string
The blob can optionnaly be sliced with the slice arguments
Params:
Name | Type | Attribute | Description |
blob | Blob | Blob to convert and optionnally sample |
|
chunk | Number | Size in bytes to slice blob |
public compareBuffers(buf1: ArrayBuffer, buf2: ArrayBuffer): Boolean version 1.0.0 since 1.0.0 source
import {compareBuffers} from 'blob-compare/src/lib.js'
Compares two buffers byte to byte
Params:
Name | Type | Attribute | Description |
buf1 | ArrayBuffer | First buffer |
|
buf2 | ArrayBuffer | Second buffer |