Skip to content

Instantly share code, notes, and snippets.

View DylanDmitri's full-sized avatar
🅱️

Dylan Dmitri Gray DylanDmitri

🅱️
View GitHub Profile
@Xample
Xample / BlobStreamer.ts
Created May 2, 2018 06:00
A class to read a file (or blob) chunk by chunk
export type bytes = number;
export class BlobStreamer {
protected readonly defaultChunkSize = 64 * 1024; // 64k (more is faster but makes chrome crash on large blobs?!)
private offset: bytes = 0;
constructor(private blob: Blob) {
this.rewind();
}