Skip to content

New file format (stabilization) #1173

@flxzt

Description

@flxzt

Let's track what Rnote's new file format should look like here.

There are already some ideas and implementation for improvements floating around.

Ideally backwards compatibility is kept which I think is doable.

Improvements are:

  • A new compression format : see zstd with parallelism instead of gzip #1170
  • Move the file format version outside of the compressed data (first bytes of the file) to improve forward compatibility
  • Look into using another de-serialization format than json : bincode is very promising because it greatly improves speed, file size and memory consumption.
    Things to consider are: how to continue making upgrade path's relatively easy to implement - currently json's untyped Value's are used, that won't work with other formats. I can see two possibilities: limit additions and changes to what is backwards compatible from the perspective of the serde derived Serialize and Deserialize trait, and if that's not possible start implementing both traits manually. This can be quite tedious in some cases though.
  • Storing stroke coordinates more effiently : the ink-serialized-format does something interesting - using derivatives to reduce the data for strokes with specific shapes (?) (@Doublonmousse knows more)
  • Partial file loading : On large documents it might be preferable not having to load the entire document into memory when viewing/editing only some pages. Is is possible to encode that into the format similar to how we use an R-Tree for storing stroke bounding boxes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    devDevelopment / Build issuesneeds-discussionThis change requires some more discussion before we decide we definitely want it

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions