Fix blob encoding

Signed-off-by: John Else <john.else@citrix.com>
Replace bitstring-based codec with new streaming codec

Signed-off-by: John Else <john.else@citrix.com>