def compose(value, marshal, compress)
      flags = serializers.assoc(marshal)
      flags |= COMPRESSED_FLAG if compress

      value.prepend([flags].pack('C'))
    end
def compose(value, marshal, compress)
      flags = serializers.assoc(marshal)
      flags |= COMPRESSED_FLAG if compress

      value.prepend([flags].pack('C'))
    end
Composes a single byte comprised of the chosen serializer and compression
 options. The byte is formatted as:

 | 0000 | 0 | 000 |

 Where there are four unused bits, 1 compression bit, and 3 bits for the
 serializer. This allows up to 8 different serializers for marshaling.

 @param  [String] value String to prefix with flags
 @param  [Module] marshal The marshal module to be used
 @param  [Boolean] compress Flag determining whether the value is compressed
 @return [String] The original string with a single byte prefixed

 @example Compose an option embedded string

   entity.compose(string, Marshal, false) => 0x1  + string
   entity.compose(string, JSON, true) => 0x10 + string