Asset Wrapper

From Second Life Wiki
Jump to navigation Jump to search
Reference extension id mime type LSL
Asset Wrapper asset unassigned application/vnd.ll.asset


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

  • provides features for attribution.
  • the meta-data needs to be in the first network packet. (specifically a requirement of texture attribution)
  • supports arbitrary meta-data.
  • introduces minimal byte overhead and does not require increased payload size.

Other container formats were considered but rejected for one of:

  • too much overhead
  • poor cross-language and cross-platform support
  • geared for streaming content rather than fixed assets.


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:

  • must be an array of arrays.
  • should be binary
  • may not have a header to indicate binary serialization
  • must indicate if they are not serialized in the binary format in the first line of the file.
  • should not contain more than one segment of a particular content-type.

The meta-data segment:

  • must contain the 'content-type' of the data.
  • should contain a 'creation-date' of the data.
  • should not contain a 'content-length'.


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


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.

        llSay(0, "Hello, Avatar!");

    touch_start(integer total_number)
        llSay(0, "Touched.");