You say you want to sort and unsort because the data needs to be compressed (which takes time) before being sent over a network, and compressing sorted data "should" be faster than compressing unsorted data.
This sounds like a case of premature optimization. "Should" be faster sounds like a guess. You should test compressing sorted data vs. compressing unsorted data to see if there's any difference. You would also need to take the sorting and unsorted time into account. There's a good chance that the cost of sorting would be much more any any possible gain from compressing a sorted list.
Even if you find that compressing sorted data is faster, it may not matter.
Here's the problem with unsorting.
Forget about software for a moment. Suppose I give you the following sorted list:
2 7 9 10 15 18 19 20 26 29
Now unsort it.
How would you do it? Without any additional information, there's no way to know what the "proper" order is. It may very well have been sorted to begin with, in which case it's already "unsorted".
At a minimum, you would need to know what position each value was in when the list is unsorted. So if the unsorted list looked like this:
10 9 26 29 18 2 20 7 19 15
You would need another list giving the original index of each value in the sorted list:
5 7 1 0 9 4 8 6 2 3
But now you have two lists of numbers, so you've doubled the size of the data you need to compress and send. On top of that, one of those lists is unsorted. So you're back to where you started.
The only possible way you could gain anything is if the items in the original list are not just numbers but a large aggregate data type, so that the list of indexes is small compared to the original list. In that case, you could add the original list index to the datatype to simplify keeping track of it. Then you would again have to test if compressing a sorted list is faster than an unsorted list. But again, the chance that compressing a sorted list is faster is small, even more so if the list contains complex data types.
My recommendation: just compress and send the unsorted list.