 <p>Assuming that:</p> <ul> <li>You can keep copies of the original and end data on both your field devices and your base system</li> <li>When you talk about swaps, you mean two items in the list are swapped with one another</li> </ul> <p>Your best solution is probably:</p> <p>Rather than keeping a list of all the swaps you do as they are performed, compare your starting and finishing data at the end of the day, and then generate the swaps you would need to make that change. This would ignore any locations in the list that remain unchanged, even if they are only unchanged because a series of swaps "undid" some change. If you have your data take the form of <code>a,b,a,b,...</code> where <code>a</code> tells you the index of the next elements to leave in the same order they're in, and <code>b</code> tells you the index of the item to swap it with.</p> <p>Because you're only doing swaps instead of shifts, you should very rarely end up with data like your sample data where 30, 40, and 50 are in the same order but in a slightly different location. Since the number of swaps will be between 1/4 and 1/10 the number of original items in the list, you'll usually have a big chunk of your data in both the same order and the same location it was in originally. Let's assume the following swaps were made:</p> <pre><code>1 &lt;-&gt; 9 4 &lt;-&gt; 2 5 &lt;-&gt; 2 </code></pre> <p>The resulting list would be:</p> <pre><code> 1. 90 2. 50 3. 30 4. 20 5. 40 6. 60 7. 70 8. 80 9. 10 </code></pre> <p>So the change data could be represented as:</p> <pre><code> 1,9,2,4,4,5 </code></pre> <p>That's only six values, which could be represented as 16-bit numbers (assuming you won't have over 16,000 items in your initial list). So each "effective" swap could be represented with a single 32-bit number. And since the number of actual swaps will generally be 1/5 to 1/2 the size of the original list, you'll end up sending between 10% and 20% of the data in your original list over the wire (or less since the number of "effective" swaps may be even less if some of those swaps undo one another).</p>