Module amf3
source code
AMF3 implementation.
AMF3 is the default serialization for ActionScript 3.0 and provides various advantages over
AMF0, which is used for
ActionScript 1.0 and 2.0. It adds support for sending int
and uint objects as integers and supports data types that
are available only in ActionScript 3.0, such as ByteArray and ArrayCollection.
|
|
ObjectEncoding
AMF object encodings.
|
|
|
DataOutput
I am a StringIO type object containing byte data from
the AMF stream.
|
|
|
DataInput
I provide a set of methods for reading binary data with
ActionScript 3.0.
|
|
|
ByteArray
I am a StringIO type object containing byte data from
the AMF stream.
|
|
|
ClassDefinition
This is an internal class used by Encoder/Decoder to
hold details about transient class trait definitions.
|
|
|
Context
I hold the AMF3 context for en/decoding streams.
|
|
|
Decoder
Decodes an AMF3 data stream.
|
|
|
Encoder
Encodes an AMF3 data stream.
|
str
|
encode_int(n)
Encodes an int as a variable length signed 29-bit integer as defined
by the spec. |
source code
|
|
|
|
decode_int(stream,
signed=False)
Decode int. |
source code
|
|
|
|
use_proxies_default = False
|
|
|
TYPE_UNDEFINED = '\x00'
|
|
|
TYPE_NULL = '\x01'
|
|
|
TYPE_BOOL_FALSE = '\x02'
|
|
|
TYPE_BOOL_TRUE = '\x03'
|
|
|
TYPE_INTEGER = '\x04'
|
|
|
TYPE_NUMBER = '\x05'
|
|
|
TYPE_STRING = '\x06'
|
|
|
TYPE_XML = '\x07'
|
|
|
TYPE_DATE = '\x08'
|
|
|
TYPE_ARRAY = '\t'
|
|
|
TYPE_OBJECT = '\n'
|
|
|
TYPE_XMLSTRING = '\x0b'
|
|
|
TYPE_BYTEARRAY = '\x0c'
|
|
|
REFERENCE_BIT = 1
|
|
|
MAX_29B_INT = 268435455
|
|
|
MIN_29B_INT = -268435456
|
|
|
ENCODED_INT_CACHE = {}
|
|
|
__package__ = 'pyamf'
|
Imports:
datetime,
zlib,
pyamf,
codec,
util,
xml,
python
|
Encodes an int as a variable length signed 29-bit integer as defined
by the spec.
- Parameters:
n - The integer to be encoded
- Returns:
str
- The encoded string
- Raises:
OverflowError - Out of range.
|