Asset Wrapper

Reference extension id mime type LSL
Asset Wrapper asset unassigned application/vnd.ll.asset

Requirements

A simple container format has been invented to wrap assets in a somewhat flexible and concise manner. Specifically we needed a format which:

Other container formats were considered but rejected for one of:

Specification

The asset type is an LLSD array of arrays. Each sub-array will contain a LLSD map of meta-data followed by the data segment. Asset files are serialized in binary LLSD unless a header in asset file indicates otherwise.

The asset file:

The meta-data segment:

examples

This is a notation based mock-up of what an asset will actually look like:

[[{'content-type':'image/x-j2c', 
   'creation-date':'2007-01-01T00:01:00Z', 
   'creator-id':u3c115e51-04f4-523c-9fa6-98aff1034730}, 
 <BINARY IMAGE DATA>]] 

This example shows two different wrapped assets. Note that the first binary blob is serialized as raw data and the curly braces are inside the 160 bytes of content. The vnd.ll.lslbyte presented here is a (somewhat truncated) base64 encoding of the byte code generated by compiling the related vnd.ll.lsltext.

[
  [
    {
      'content-type':'application/vnd.ll.lsltext', 
      'creation-date':'2007-03-15T18:30:00Z', 
      'creator-id':u3c115e51-04f4-523c-9fa6-98aff1034730
    },
    b(160)"default
{
    state_entry()
    {
        llSay(0, "Hello, Avatar!");
    }

    touch_start(integer total_number)
    {
        llSay(0, "Touched.");
    }
}"
  ],
  [
    {
      'content-type':'application/vnd.ll.lslbyte', 
      'creation-date':'2007-03-15T18:30:18Z', 
      'creator-id':u3c115e51-04f4-523c-9fa6-98aff1034730
    },
    b64"AABAAAAAAAAAAAIAAAA//wAAP/8AAADgAAAA5wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AABkAAAAZAAAAAAAAAAAAAAAZAAAAAAAAAABAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAQAAAAAAAA
AAUAAAAFAAAAABAAAAAAAAAAPgAAAAQAAAAFAGNbXgAAAABgSGVsbG8sIEF2YXRhciEAZgAAAABc
XgAAAAhwEQjRABeVAAAABQBjW14AAAAAYFRvdWNoZWQuAGYAAAAAXF4AAAAIcBEI0QAXAZUAAEAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" 
  ]
]