分享

What a Binary Encoding Means

 deepblue 2008-08-02
There has always been some confusion about what it means to use a "binary encoding" with your web service.
The word encoding is used in a very specific sense here, which should also help you figure out the implications of choosing an encoder in the future. There are two words, encoding and formatting, that I use a lot to keep the concepts clear. When we talk about an in-memory message, an instance of a message that your service can interact with, that message is always an XML Infoset. There is no physical representation associated with the Infoset, although you can manipulate it using XML readers and writers. On the wire, there is something physical and totally different from the Infoset, typically a stream of bytes. A formatter translates between typed objects and an XML Infoset. An encoder translates between an XML Infoset and the wire representation. You‘re probably familiar with XML representations that write out the document using text phrases to express the tags inside the document. A binary encoder is just a particular encoder implementation that uses an alternative way of representing the XML Infoset. A binary XML representation replaces the textual tags with opaque binary tokens. Different representations of XML are better at certain tasks, but they result in the construction of the same Infoset after the message is transmitted. Nothing about the encoder implies what can go into the Infoset. In particular, you can have a formatter that puts binary content into the Infoset regardless of whatever kind of encoder you want to use with that Infoset later.
 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多