Open 0xVavaldi opened 2 years ago
https://github.com/Cynosureprime/rling/issues/30 @hops was wondering if you could please take a look at this and see if my solution adequately resolves it.
Example use case
echo $'testing123\ntesting\x03\ntesting\x02\ntest\ntest\x02\n test\n test\n' > file1
LC_ALL=C sort file1 > file1_sort
make && ./rling -s file1 file1_rling && hexdump -c file1_rling && hexdump -c file1_sort
The issue is that it considers values < 10 to be incorrect in sorting order - so this 'hacky' trick is to make it think that it's actually in the right place. Using this method I was able to get a working example. The exception is when \r is involved - then rling removes data and sort keeps the \r