Protobuf implementation in javascript