         return null; // it all checks out!
     }
 
+    // hope and pray that they don't revamp amf3 again and start using this byte. Assholes.
+    public static const DICTIONARY_MARKER :int = 99;
+
     /**
      * Our static initializer.
      */

            return dest;
        }

        // TODO: Our own encoding, that takes into account
        // the ApplicationDomain.. ACK
        var bytes :ByteArray = new ByteArray();
        bytes.endian = Endian.BIG_ENDIAN;
        bytes.objectEncoding = ObjectEncoding.AMF3;
        bytes.writeObject(obj);
        return bytes;
    }

        // array used to encode (and not a network reconstruction)
        bytes.position = 0;

        // Work around dictionary idiocy. Holy shit. See note in encode().
        const isDict :Boolean = (bytes[0] === DICTIONARY_MARKER);
        if (isDict) {
            bytes.position = 1; // advance past our special marker
        }

        bytes.endian = Endian.BIG_ENDIAN;
        bytes.objectEncoding = ObjectEncoding.AMF3;
        var decoded :Object = bytes.readObject();
        if (isDict) {
            var decodedArray :Array = decoded as Array;
            var asDict :Dictionary = new Dictionary();
            for (var jj :int = 0; jj < decodedArray.length; jj += 2) {
                asDict[decodedArray[jj]] = decodedArray[jj + 1];
            }
            decoded = asDict;
        }
        return decoded;
    }

    /**
