Skip to content

feat: slicing a Blob #26

Open
Open
@grabbou

Description

@grabbou

Previous implementation of Blob was naive, because it sliced everything in memory, assuming contents were already loaded. In reality, Blob arrayBuffer() or bytes() are async and lazy. However, slice is synchronous.

We should implement something similar to a BlobView that gets created as a subclass of a Blob, holds information about offset/length of a slice and will still ready full underlying stream(), but return its slice.

Here, it might be relevant to implement seeking a stream (as discussed with @mani3xis)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions