Wiki

Clone wiki

Cubeia Styx / JavascriptHome

Javascript

Marshalling

Protocol objects generated by Styx can be converted to byte array by calling the method save().

var login = FIREBASE.LoginRequestPacket();
var byteArray = login.save();
var bytes = byteArray.createGameDataArray();

To wrap the bytes in a Base 64 string

var b64 = FIREBASE.ByteArray.toBase64String(bytes);

Updated