Fixed bug when sending long data in base64 encoding
Allow to choose the codec when sending via RPC