Yes that's correct - this comparator compares entries based on offset and it will put the larger offset entries at the start and smaller offset entries at the end (note that this does not take the size of the entries into account). This is also intentional. This way of sorting helps the truncateFile function to start from the end of the fileand work backwards (reducing the file).

Will add the javadoc and also cover the zero comparison