Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format needs documentation #6

Open
Daniel15 opened this issue Aug 15, 2016 · 3 comments
Open

Format needs documentation #6

Daniel15 opened this issue Aug 15, 2016 · 3 comments

Comments

@Daniel15
Copy link

Daniel15 commented Aug 15, 2016

Hello!

This project is a really interesting idea! I'm trying to write server-side implementations in C# (ASP.NET Core) and PHP, but am having trouble working out the exact format of the delta.

As shown in deltaCalculator.js, going from "this is some test. blah blah blah" to "this is other text. blah blah blah" results in this delta:

§8-1§2-1§1+th§3+r§4-1§1+x

In the 1+th segment, what does the "1" represent? Does it mean that the addition is offset from the previous removal by one character? Is the offset from the start of the previous substring, or the end? It would be good to write a simple spec for other people wanting to implement the same protocol.

Thanks!

@gmetais
Copy link
Owner

gmetais commented Aug 15, 2016

Hi @Daniel15. As the format is probably going to change to binary soon (#7), do not spend too much time writing these implementations now.

I'll answer to the format question when I get a little more time!

@gmetais
Copy link
Owner

gmetais commented Aug 27, 2016

You made me realize that the number of added/removed chars was included in the next offset, which was useless.

Have a look at gmetais/sw-delta-nodejs#1. I believe it's easier to understand now, can you tell me if it still requires a documentation?

@Daniel15
Copy link
Author

Daniel15 commented Sep 4, 2016

I'll try to take a look soon. I think it's still worth documenting the format for clarity :)

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

No branches or pull requests

2 participants