Mastery Assessment: File API & Binary Data

Complete this assessment with 100% score to master this chapter.

01What is the primary difference between a `Blob` and a `File` object in JavaScript?

02Which `FileReader` method is used to convert a file into a Base64-encoded string, often used for setting an `<img>` src?

03What low-level object represents a fixed-length raw binary data buffer?

04How can you read only a specific part of a 2GB file without crashing the browser tab?

05What must you do to prevent memory leaks when using `URL.createObjectURL()`?

06What is the primary difference between `ArrayBuffer.slice()` and `TypedArray.subarray()`?

07Which view object should be used when you need to read multiple different data types (e.g., an Int16 followed by a Float32) from a single binary buffer?

08What is a 'Transferable Object' in the context of Web Workers and ArrayBuffers?

09Which TypedArray is specifically designed for image data in a `<canvas>`, automatically 'clamping' values between 0 and 255?

10What does 'Endianness' refer to in binary data processing?