encodeAsBinary static method
dynamic
encodeAsBinary(
- dynamic obj,
- dynamic callback
Implementation
static encodeAsBinary(obj, callback) {
writeEncoding(bloblessData) {
var deconstruction = Binary.deconstructPacket(bloblessData);
var pack = encodeAsString(deconstruction['packet']);
var buffers = deconstruction['buffers'];
callback(<dynamic>[pack, ...buffers]); // write all the buffers
}
writeEncoding(obj);
}