Hello, i'm seeking advices on how decode (in a generic way) the data in an
avro binary file. Avro files are composed with schema and data at the end.
For exemple, if i have this avro file (attachment), i want to decode (and
put on my screen) the data, using theses functions : decodeString(),
decodeInt()... (it depend of which type is )

I tried something like :
    avro::DataFileReaderBase decode("test.bin");
    decode.init();

    std::cout<<decode.hasMore()<<std::endl; //0 = false
    while(decode.hasMore()){
       std::cout<<decode.decoder().decodeString()<<std::endl;
       std::cout<<decode.decoder().decodeDouble()<<std::endl;
    }
    decode.close();

When i do this, i always have a segmentation fault or nothing.

Thanks,
Nicolas

Attachment: test.bin
Description: Binary data

Reply via email to