Explorar o código

use a bigger buffer

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
3c7e78df6c
Modificáronse 1 ficheiros con 1 adicións e 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) {