I'm still looking into the details, so this is more for opening a discussion on whether people think this is worth adding. I understand that it may considered as outside the scope of this crate.
I'm looking into sending Changesets serialized over the wire, and I'm interested in minimizing the payload size. What are your thoughts on introducing a new method (and possibly types) to represent something along the lines of "skip forward this many tokens"?
e.g., Instead of
Same("Two roads diverged in a yellow wood,\n"),
Same("And be one traveler, long I stood\n"),
Rem("And sorry I could not travel both\n"),
Add("And looked down one as far as I could")
Perhaps something like this?
ContiguouslySame(2),
Rem("And sorry I could not travel both\n"),
Add("And looked down one as far as I could")
Instead of adding a new Difference enum value, which would obviously cause pain, I was thinking it could be offered in a separate method so that users can opt-in to a more efficient representation if they want.
I'm still looking into the details, so this is more for opening a discussion on whether people think this is worth adding. I understand that it may considered as outside the scope of this crate.
I'm looking into sending
Changesets
serialized over the wire, and I'm interested in minimizing the payload size. What are your thoughts on introducing a new method (and possibly types) to represent something along the lines of "skip forward this many tokens"?e.g., Instead of
Perhaps something like this?
Instead of adding a new
Difference
enum value, which would obviously cause pain, I was thinking it could be offered in a separate method so that users can opt-in to a more efficient representation if they want.