THRIFT-402. rb: MemoryBuffer > 4096 bytes will truncate remaining bytes This patch fixes the issue, preserving the remaining bytes.