Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tootallnate/node-amf
"Action Message Format" read() and write() functions for Buffers
https://github.com/tootallnate/node-amf
Last synced: 4 days ago
JSON representation
"Action Message Format" read() and write() functions for Buffers
- Host: GitHub
- URL: https://github.com/tootallnate/node-amf
- Owner: TooTallNate
- Created: 2013-02-12T02:23:59.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-06-23T18:30:02.000Z (over 9 years ago)
- Last Synced: 2024-12-09T19:53:55.390Z (17 days ago)
- Language: JavaScript
- Homepage:
- Size: 246 KB
- Stars: 22
- Watchers: 5
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
Awesome Lists containing this project
README
node-amf
========
### "[Action Message Format][AMF]" read() and write() functions for Buffers
[![Build Status](https://travis-ci.org/TooTallNate/node-amf.svg?branch=master)](https://travis-ci.org/TooTallNate/node-amf)This module reads and writes AMF ([Action Message Format][AMF], commonly used
with Adobe products) data types to/from node.js `Buffer` instances.For example, the [FLV][node-flv] container format by Adobe encodes its "metadata"
packets with AMF data. This module can decode those packets back into JavaScript
values.Installation
------------Install through npm:
``` bash
$ npm install amf
```Example
-------Here's an example of reading an ECMA Object from a Buffer:
``` javascript
var amf = require('amf');// this is an AMF-encoded Object...
var data = new Buffer('03 00 03 66 6f 6f 02 00 03 62 61 72 00 00 09'.replace(/ /g, ''), 'hex');// read the Object out from the Buffer
var obj = amf.read(data, 0);console.log(obj);
// { foo: 'bar' }
```API
---Coming soon!
[AMF]: http://en.wikipedia.org/wiki/Action_Message_Format
[node-flv]: https://github.com/TooTallNate/node-flv