Skip to content

Support zero-copy deserialization from memfiles #102

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].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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