Timeline for How does delta compression reduce the amount of data sent over the network?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 29, 2021 at 14:45 | history | edited | corsiKa | CC BY-SA 4.0 |
deleted 279 characters in body
|
May 17, 2017 at 0:39 | comment | added | corsiKa | An optimal diff and an optimal delta compression are the same. While the diff utility on the command line is geared for text files and would likely not provide you an optimal result, I would recommend researching libraries that do the delta compression for you. There's nothing fancy about the word delta - delta and diff, in this sense, mean literally the same thing. That seems to have been lost over the years. | |
May 16, 2017 at 21:53 | comment | added | Selali Adobor | "Doing this you leverage the decades of expertise in detecting differences in text (or binary!) and don't have to worry about missing anything yourself. Now ideally you also use a library that does this behind the scenes for you to make it even easier on you as a developer." That part definitely makes it sound like you're suggesting using a diff or using a library that uses a diff when no one would reasonably do such a thing. I wouldn't call delta compression "diffing", it's just delta compression, the similarities are superficial | |
May 15, 2017 at 22:30 | comment | added | corsiKa | @gronostaj This was an example to get the point across. I don't actually advocate using diff for JSON - that's why say "suppose." | |
May 15, 2017 at 21:54 | comment | added | gronostaj |
Using diff sounds like an inefficient hack. Keeping JSON string on the receiving end, patching and deserializing it every single time is unnecessary. Calculating difference of two key-value dictionaries isn't a complicated task, basically you just loop over all keys and check if values are equal. If not, you add them to resulting key-value dict and finally you send the dict serialized to JSON. Simple, no years of expertise needed. Unlike diffs, this method: 1) won't include old (replaced) data; 2) plays more nicely with UDP; 3) doesn't rely on newlines
|
|
May 15, 2017 at 17:12 | history | answered | corsiKa | CC BY-SA 3.0 |