Asset Wrapper

From Second Life Wiki
Revision as of 13:51, 17 April 2007 by Phoenix Linden (Talk | contribs)

Jump to: navigation, 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:


And a more significant example:

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

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