Skip to content

Support zero-copy deserialization from memfiles #102

@mratsim

Description

@mratsim

In some protocol or serialization format, the json to deserialize is embedded in a file (in my case safetensors) along with accompanying data and we know the offset and length of that data.

Currently the library can only process string inputs, this means that we have to copy the data into a string even though we could memory-map the json data and use toOpenArray and a cast to get openArray[char].

Given that in Nim openArray[char] also matches strings, we should be able to change all the parseHook to take openArray[char].

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