* @param bytes Serialized positions
* @return A decoded integer array of positions
*/
public static int[] deserializePositions(byte[] bytes) throws IOException {
ByteArrayInputStream byteStream = new ByteArrayInputStream(bytes);
BitInputStream bitStream = new BitInputStream(byteStream);
int[] positions = new int[bitStream.readGamma()];
for(int i = 0; i < positions.length; i++) {
if (i == 0) {
positions[i] = bitStream.readGamma() - 1;
} else {
positions[i] = (positions[i - 1] + bitStream.readGamma());
}
}
bitStream.close();
return positions;
}