index.js
function findAvailableCompressionForFile(compressionList, acceptedEncoding) {
        if (acceptedEncoding) {
            for (var i = 0; i < compressionList.length; i++) {
                if (acceptedEncoding.indexOf(compressionList[i].encodingName) >= 0) {
                    return compressionList[i];
                }
            }
        }
        return null;
    }
function findAvailableCompressionForFile(compressionList, acceptedEncoding) {
        if (acceptedEncoding) {
            for (var i = 0; i < compressionList.length; i++) {
                if (acceptedEncoding.indexOf(compressionList[i].encodingName) >= 0) {
                    return compressionList[i];
                }
            }
        }
        return null;
    }
function findAvailableCompressionForFile ( compressionList , acceptedEncoding ) { if ( acceptedEncoding ) { for ( var i = 0 ; i < compressionList . length ; i ++ ) { if ( acceptedEncoding . indexOf ( compressionList [ i ] . encodingName ) >= 0 ) { return compressionList [ i ] ; } } } return null ; }
Searches for the first matching compression available from the given compressions.
@param {[Compression]} compressionList
@param {string} acceptedEncoding
@returns
Searches for the first matching compression available from the given compressions .