Abstract Algorithm: String / Byte Comparison / Diff
<p>This is a rather abstract question as I yet have no idea how to solve it and haven't found any suitable solutions.</p>

<p>Let's start with the current situation. You'll have an array of <code>byte[]</code> (e.g. <code>ArrayList&lt;byte[]&gt;</code>) which behind the scene are actually Strings, but at the current state the <code>byte[]</code> is prefered. They can be very long (1024+ bytes for each <code>byte[]</code> array whereas the <code>ArrayList</code> may contain up to 1024 <code>byte[]</code> arrays) and might have a different length. Furthermore, they share a lot of the same bytes at the "same" locations (this is relativ, a = {0x41, 0x41, 0x61}, b = {0x41, 0x41, 0x42, 0x61 } => where the first 0x41 and the last 0x61 are the same).</p>

<p>I'm looking now for an algorithm that compares all those arrays with each other. The result should be the array that differs the most and how much they differ from each other (some kind of metric). Furthermore, the task should complete within a short time.</p>

<p>If possible without using any third party libraries (but i doubt it is feasible in a reasonable time without one).</p>

<p>Any suggestions are very welcome.</p>

<p><strong>Edit:</strong></p>

<p>Made some adjustments.</p>

<p><strong>EDIT / SOLUTION:</strong></p>

<p>I'm using the Levenshtein distance now. Furthermore, I've made some slight adjustments to improve the runtime / speed. This is very specific to the data I'm handling as I know that all Strings have a lot in common (and I know approximatly where). So filtering that content improves the speed by a factor of 400 in comparison to two unfiltered Strings (test data) used directly by the Levenshtein distance algorithm.</p>

<p>Thanks for your input / answers, they were a great assistance.</p>