Re: [Development] API review request: CBOR Stream reader and writer

2018-01-24 Thread Thiago Macieira
On Wednesday, 24 January 2018 10:49:32 PST Thiago Macieira wrote: > I've added a CBOR dump tool example, which can help you with understanding > what you have: One more difference: since "convert" uses QCborValue, it will normalise a few items: $ ./convert/convert /tmp/test3.cbor [ 3

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-24 Thread Thiago Macieira
On Wednesday, 17 January 2018 13:25:53 PST Thiago Macieira wrote: > I'm also interested in what I could write as an example. Please send > suggestions. I've added a CBOR dump tool example, which can help you with understanding what you have: $ convert/convert -o line-wrap=no /tmp/test3.cbor { "

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-22 Thread Thiago Macieira
On segunda-feira, 22 de janeiro de 2018 16:56:56 PST Thiago Macieira wrote: > After fixing the converter example to properly use mmap in all three cases, > plus refactoring the CBOR parser to operate on a pre-loaded array and use > larger buffer than single-digit byte counts, the numbers are: A ma

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-22 Thread Thiago Macieira
On segunda-feira, 22 de janeiro de 2018 01:37:40 PST Thiago Macieira wrote: > Binary JSON validating: > 97,003559 task-clock:u (msec) >237.092.857 cycles >437.005.872 instructions > [15.2% was spent in QIODevice::readAll, 59.1% in fromBinaryData] > > JSON pa

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-22 Thread Thiago Macieira
On segunda-feira, 22 de janeiro de 2018 01:37:40 PST Thiago Macieira wrote: > CBOR parsing: > 341,311535 task-clock >885.053.081 cycles > 2.548.803.851 instructions > > The string parser is still showing up at 70.5% of the full execution time, > of which 33.4% a

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-22 Thread Thiago Macieira
On quarta-feira, 17 de janeiro de 2018 13:25:53 PST Thiago Macieira wrote: > My current idea is a command-line tool that converts between serialisation > formats: > * CBOR > * CBOR diagnostic notation (output only, since I won't write the parser) > * JSON > * XML > * Qt binary JSON > * Plain

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-18 Thread Thiago Macieira
On Thursday, 18 January 2018 00:51:18 PST Dominik Holland wrote: > Am 01/18/2018 um 04:22 AM schrieb Thiago Macieira: > > On Wednesday, 17 January 2018 13:25:53 PST Thiago Macieira wrote: > >> Another idea is to update the network-chat example to use CBOR instead of > >> its plaintext protocol. In

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-18 Thread Dominik Holland
Am 01/18/2018 um 04:22 AM schrieb Thiago Macieira: > On Wednesday, 17 January 2018 13:25:53 PST Thiago Macieira wrote: >> Another idea is to update the network-chat example to use CBOR instead of >> its plaintext protocol. In this one, I could use the stream reader and >> writer. This example is a

Re: [Development] API review request: CBOR Stream reader and writer

2018-01-17 Thread Thiago Macieira
On Wednesday, 17 January 2018 13:25:53 PST Thiago Macieira wrote: > Another idea is to update the network-chat example to use CBOR instead of > its plaintext protocol. In this one, I could use the stream reader and > writer. This example is a perfect candidate to have a CoAP version in the > future

[Development] API review request: CBOR Stream reader and writer

2018-01-17 Thread Thiago Macieira
Hello I finished writing the documentation for the two basic classes for CBOR. You can find them in reviews https://codereview.qt-project.org/107465 https://codereview.qt-project.org/107466 Please review. I will take a couple more days writing the docs for QCbor{Value,Map,Array} and then I'll u