key in version 2 is raw value instead of base64 (which reduces its complexity), made PasteDecryptor support both versions of the format, refactoring method names, replacing var by let / const, reducing zlib compression level from 9 to 7 to half the time spent on compression

This commit is contained in:
El RIDO 2018-12-29 18:40:59 +01:00
parent be69e4a50f
commit 0ee86f33da
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
6 changed files with 301 additions and 318 deletions

View file

@ -5,7 +5,7 @@ let ret;
async function initialize() {
if (ret) return ret;
const COMPRESSION_LEVEL = 9;
const COMPRESSION_LEVEL = 7;
const NO_ZLIB_HEADER = -1;
const CHUNK_SIZE = 32 * 1024;
const map = {};