Sfoglia il codice sorgente

Merge branch 'master' of https://github.com/101arrowz/fflate

Arjun Barrett 4 anni fa
parent
commit
20795bce8a
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      README.md
  2. 1 1
      src/index.ts

+ 2 - 2
README.md

@@ -243,7 +243,7 @@ const zipped = fflate.zipSync({
   'dir1': {
     'nested': {
       // You can use Unicode in filenames
-      '你好.txt': std('Hey there!')
+      '你好.txt': strToU8('Hey there!')
     },
     // You can also manually write out a directory path
     'other/tmp.txt': new Uint8Array([97, 98, 99, 100])
@@ -275,7 +275,7 @@ const zipped = fflate.zipSync({
 // |-> other
 // |   |-> tmp.txt
 // myImageData.bmp
-// superTinyFile.bin
+// superTinyFile.png
 
 // When decompressing, folders are not nested; all filepaths are fully
 // written out in the keys. For example, the return value may be:

+ 1 - 1
src/index.ts

@@ -761,7 +761,7 @@ const adler = (): CRCV => {
     p(d) {
       // closures have awful performance
       let n = a, m = b;
-      const l = d.length;
+      const l = d.length | 0;
       for (let i = 0; i != l;) {
         const e = Math.min(i + 2655, l);
         for (; i < e; ++i) m += n += d[i];