added flexnum support to ByteBuf