Skip to content

Streaming parser API? #77

@knutwannheden

Description

@knutwannheden

I would like to be able to use the CBOR parser as a tokenizer basically, so that I can parse a Stream (which gets its data from an underlying socket) into CBOR "tokens". The reason being that the document could contain some very large data structures (e.g. a very long array) and from what I can tell the current API would require reading the full array into memory into a corresponding CBORObject. In my case I would then copy the data from there into the application's own data structures and would thus temporarily lead to a lot of additional data being allocated (and also put more pressure on the GC).

.NET's own CBOR implementation provides a CBOR parser that can be used directly. Unfortunately it doesn't allow me to read data synchronously from a Stream, which is why I prefer to use this library. Now I am wondering how I should proceed when parsing very large arrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions