You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If reading 10 bytes from stream returns an error or doesn’t return the bytes with hex encoding “86 48 F0 9F 8C 90 F0 9F 93 A6” (the CBOR encoding of the 6-item array initial byte and 8-byte bytestring initial byte, followed by 🌐📦 in UTF-8), return a “format error”.
I think this will cause implements like below
head=read_first_10_byte(path)if(head==[8648F09F8C90F09F93A6]){// this is web bundleswitch(parse_cbor(path)['version']){// version switch}}else{// this is not web bundle}
but if webbundle format will change like below in the future. and also version ++.
the length of array will increase and first 10 byte will change.
this cause previous code not working, should be like this
head=read_first_10_byte(path)if(head==[8648F09F8C90F09F93A6]){// this is web bundleswitch(parse_cbor(path)['version']){// version switch}}elseif(head==[*87*48F09F8C90F09F93A6]// this is also new web bundleswitch(parse_cbor(path)['version']){// version switch}}else{// this is not web bundle}
so, this version model is not allow adding meta-section to webbundle cbor array.
if you think cbor array should not change from 6 forever, it works.
but I think it seems better to find other way to
magic number should usable for file detection
cbor structure update could detect by version, and not affect to 1
in https://wicg.github.io/webpackage/draft-yasskin-wpack-bundled-exchanges.html#rfc.section.3.3
I think this will cause implements like below
but if webbundle format will change like below in the future. and also version ++.
the length of array will increase and first 10 byte will change.
this cause previous code not working, should be like this
so, this version model is not allow adding meta-section to webbundle cbor array.
if you think cbor array should not change from 6 forever, it works.
but I think it seems better to find other way to
for example
The text was updated successfully, but these errors were encountered: