Skip to content

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-2014 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 is encoded as a dense array when it has ascending integer keys
  that start with 1 and have no gaps. An empty table adheres to this rule.
  A table with all keys being strings is encoded as an anonymous object.
  In all other cases, a table is encoded as a dictionary.

amf3.decode(data [, position])

- Decodes an object from 'data' and returns it as the first value.
- The second argument specifies an 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 decoded as a table with the additional '_class'
  (class name) and '_data' (externalizable object's data) fields set when
  applicable.


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

Linux, OS X:

	make
    make install

BSD:

	gmake
    gmake install

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

    make PREFIX=/your/path install

You can also build with CMake:

	cmake .
	make
	make install


History
-------

Version 1.0.3 [2014-07-31]
+ Support for Vector and Dictionary types.

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

Version 1.0.1 [2013-01-02]
+ Support for decoding the AMF3 Object type.

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