Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

AMF3 encoding/decoding library for Lua

branch: master
README
AMF3 encoding/decoding library for Lua
Copyright (C) 2012-2013 Arseny Vakhrushev <arseny.vakhrushev at gmail dot com>


Description
-----------

The library provides two functions:

amf3.encode(value)

- Encodes 'value' into an AMF3 representation and returns it as a string.
- A table with plain numeric keys 1..n without gaps is encoded as a sequence
  using the AMF3 Array type. Otherwise, the keys are converted into strings
  and the table is encoded as an anonymous object using the AMF3 Object type.

amf3.decode(data [, position])

- Decodes an object from 'data' and returns it as the first value.
- The second argument specifies initial data position (>= 0) in the string.
- The number of bytes read from the string is returned as the second value.
- The AMF3 Object type is converted into a table with the additional '_class'
  (class name) and '_data' (externalizable object's data) fields set when
  applicable.


Installation
------------

* Linux, OSX (Darwin):

    sudo make install

* FreeBSD:

    sudo gmake install

If you need specific adjustments, please refer to 'Makefile' and 'config'.
For example, you might want to change the installation prefix in place:

    sudo PREFIX=/your/path make install


History
-------

Version 1.0.2 [20/May/2013]
+ Mixed tables are encoded as anonymous AMF3 objects.

Version 1.0.1 [02/Jan/2013]
+ Support for decoding the AMF3 Object type.

Version 1.0.0 [19/Jun/2012]
Something went wrong with that request. Please try again.