Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pinch - Some crazy HTTP ZIP Magic

Pinch - Some crazy HTTP ZIP Magic

Retrieve a file from inside a ZIP file, over the network!

Pretty sweet, eh?

Peter Hellberg

November 24, 2011

More Decks by Peter Hellberg

Other Decks in Programming


  1. I’m a Senior Systems Architect at Athega (where I build

    stuff in Ruby) ⃔ I’m also the owner o Code7 Interactive (where I build stuff in Ruby) ⃕
  2. FILE ENTRY 1 <local ile header> <data> FILE ENTRY 2

    <local ile header> <data> CENTRAL DIRECTORY <offset to local file headers> END OF CENTRAL DIRECTORY Signature 0x06054b50 <offset to start of central directory> ZIP File Format
  3. 1 HEAD Total ile size 2 GET Last 4096 bytes

    (End of Central Directory) 3 GET Central Directory start → Central Directory start + size 4 GET File offset → File offset + (compressed) size HTTP Requests