ZIP files are fun. You need to scan for 4 magic bytes starting from the end of the file. Then from there you can figure out how many bytes before that offset to start finding "file header offsets" in the rest of the file and the file names / sizes. But then you need to parse the file header offset to actually know where the file starts. :P

Very convoluted but I guess it could be worse.

Follow

@pospi Nice! Honestly it's been kinda fun to uae fancy new built in JS primitives like DataView and Blob.arrayBuffer. My first crack at binary formats like 12 years ago was a horrible slog in comparison 🤪

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.