Explorar el Código

use a bigger buffer

Gildas hace 7 años
padre
commit
3c7e78df6c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/single-file/base64.js

+ 1 - 1
lib/single-file/base64.js

@@ -144,7 +144,7 @@ this.base64 = this.base64 || (() => {
 		const len = uint8.length;
 		const extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
 		const parts = [];
-		const maxChunkLength = 16383; // must be multiple of 3
+		const maxChunkLength = 1572864; // must be multiple of 3
 
 		// go through the array every three bytes, we"ll deal with trailing stuff later
 		for (let i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {