UNDERSTAND
Bring these concepts with you
BUILD
Your implementation
- Read each entry descriptor in the table of contents starting immediately at header offset 16.
- Each entry descriptor contains: 16-byte null-padded UTF-8 filename, 32-bit payload offset (LE), 32-bit uncompressed size (LE), and 32-bit CRC32 checksum.
- Store the mapped entries in an array of metadata objects and reject table overflows.
function parseTable(buffer, header) {
// Loop through entryCount, reading name, offset, size, and crc32.
}Need a hint?
- Advance a cursor by descriptor size (28 bytes) for each entry up to entryCount.
- Trim trailing null bytes from the filename string using str.replace(/\0+$/, '').
Saved on this device · 0 / 6000 · Do not include passwords or private data.
VERIFY
Acceptance checks
From the folder containing your downloaded files, run:
node checks.mjs ./starter.mjs 1 through 6 2This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.
Record your attempt to enable the checklist and reference comparison.
Compare with the reference
Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.
EXPLAIN
Your interviewer asks
How does checking offset + size <= buffer.length defend against integer overflow or malicious packfile exploits?
Say your answer aloud, then record the trade-offs and evidence in your notes above.
LOCAL VOICE REHEARSAL
Rehearse your step walkthrough aloud
00:00/ 02:00