Slide 10
Slide 10 text
10
Top Level Structure
; CBOR Array
webbundle = [
magic: h'', ; UTF-8
version: bytes .size 4,
primary-url: whatwg-url,
section-lengths:bytes.cbor
[*(section-name:tstr,length:uint)],
sections: [*(index|manifest|signatures|critical|responses)],
length: bytes .size 8
]
Index Section
index for response section. URL => [variation, offset, length]
{
"http://example.com/index.html": [["ja"], 1, 100], // for Accept-Encoding: ja
"http://example.com/index.html": [["en"], 101, 100], // for Accept-Encoding: en
"http://example.com/style.css": [[ ], 201, 100],
"http://example.com/script.js": [[ ], 301, 100],
"http://example.com/favicon.ico": [[ ], 401, 100],
}
variation: based on Content-Language, Content-Encoding(?),