From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.8.234 with SMTP id u10mr5007568paa.40.1390553689668; Fri, 24 Jan 2014 00:54:49 -0800 (PST) X-Received: by 10.140.92.180 with SMTP id b49mr1144qge.40.1390553689616; Fri, 24 Jan 2014 00:54:49 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.ripco.com!news.glorb.com!rq2no483431pbb.1!news-out.google.com!gg4ni2016qab.0!nntp.google.com!k15no2067515qaq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 24 Jan 2014 00:54:49 -0800 (PST) In-Reply-To: <13pvagjpwejni$.1e8ll5btxg1f5$.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.166.54.34; posting-account=bXa9kQoAAADQ0LSY80qTyLW4hcbm0Soz NNTP-Posting-Host: 81.166.54.34 References: <20a36d96-850e-4020-8dfa-777eb9c944f4@googlegroups.com> <9e27abb7-e944-4bd4-a10c-600fe4da7872@googlegroups.com> <56a5aeb6-8704-457c-a24f-b664746afe72@googlegroups.com> <13pvagjpwejni$.1e8ll5btxg1f5$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5bf8c737-b99d-4069-885f-03fe82f06cc6@googlegroups.com> Subject: Re: Binary and XML serialization of types From: hanslad@gmail.com Injection-Date: Fri, 24 Jan 2014 08:54:49 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:18278 Date: 2014-01-24T00:54:49-08:00 List-Id: > > The right way is to ensure it portable. That requires overriding default > > implementations. Here you can find some examples of portable encoding of > > scalar types: > > > > http://www.dmitry-kazakov.de/ada/components.htm#16.3 > > > > > I want this to perform as fast as possible. > > > > Performance is not a big deal because stream I/O takes much more resources > than any conversions. Thank you all for your answers. In short, I want to develop a client/server library to encode (and decode) structures of data(records) and request the data over tcp. Is there a faster way to do this than using streams? Also, the encoding of a structure could be dependent of where the structure is used. Say, the first byte sent over wire tells if the "Identity" field in a record should be decoded as a 2 or 4 byte integer. For me it would be locical to separate all the "wire information" from the type information. Today, the binary and xml encoding scheme is defined, and I had hope to be able to separate this in different packages. What is the locical way to do this? Thanks.