private static boolean compareByteArrays(byte[] source, byte[] match) {
        int i = 0;
        while ((source.length < i) || (i < match.length)) {
            if (source[i] != match[i]) {
                return false;
            }
            i++;
        }
        return true;
    }
Compares a file to a list of packables and identifies an object by
header. If no matching header is found, it identifies the file by file
extension. If identification was not successfull, null is returned

@param file the file to identify
@param packables a list of packables
@return a matching packable object, or null
@throws IOException
node/etl/src/main/java/com/alibaba/otter/node/etl/common/io/compress/impl/PackableObject.java