new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Bun · Runtime · all subjects

binary-data/blob

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Blob creation and properties

A Blob can be created from one or more string or binary blob parts. These parts can be string, ArrayBuffer, TypedArray, DataView, or other Blob instances. The parts are concatenated in the order they are given. Example: const blob = new Blob(["<html>Hello</html>"], { type: "text/html" }); blob.type; // => text/html; blob.size; // => 18.

Blob methods for reading content

Blob provides async methods for reading its contents in various formats. await blob.text(); // returns string in UTF-8. await blob.bytes(); // returns Uint8Array (copies contents). await blob.arrayBuffer(); // returns ArrayBuffer (copies contents). blob.stream(); // returns ReadableStream.

BunFile lazy-loaded file

BunFile is a subclass of Blob that represents a lazily-loaded file on disk. Like File, it adds a name and lastModified property. Unlike File, it does not require the file to be loaded into memory. Created with Bun.file(path). Example: const file = Bun.file("index.txt"); // => BunFile.

File Web API

File is a subclass of Blob that adds a name and lastModified property. It is commonly used in the browser to represent files uploaded with an <input type="file"> element. Node.js and Bun implement File. Example: const file = new File(["<html>Hello</html>"], "index.html", { type: "text/html" });

Give your agent this brain