Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

15 righe
544 B

  1. var base64 = require('base64-js');
  2. /**
  3. * The normal dictionary-data.js is quite large, which makes it
  4. * unsuitable for browser usage. In order to make it smaller,
  5. * we read dictionary.bin, which is a compressed version of
  6. * the dictionary, and on initial load, Brotli decompresses
  7. * it's own dictionary. 😜
  8. */
  9. exports.init = function() {
  10. var BrotliDecompressBuffer = require('./decode').BrotliDecompressBuffer;
  11. var compressed = base64.toByteArray(require('./dictionary.bin.js'));
  12. return BrotliDecompressBuffer(compressed);
  13. };