nl_tokens: Get the preferred encodings from an Accept - Encoding header .
pl_tokens: function preferredEncodings ( accept , provided ) { var accepts = parseAcceptEncoding ( accept || '' ) ; if ( ! provided ) { // sorted list of all encodings return accepts . filter ( isQuality ) . <mask> ( compareSpecs ) . map ( getFullEncoding ) ; } var priorities = provided . map ( function getPriority ( type , index ) { return getEncodingPriority ( type , accepts , index ) ; } ) ; // sorted list of accepted encodings return priorities . filter ( isQuality ) . sort ( compareSpecs ) . map ( function getEncoding ( priority ) { return provided [ priorities . indexOf ( priority ) ] ; } ) ; }