Stream encoder and decoder for RDBv6