From dcfd07df812d044730c48fd9e0ed150ee9f8caf1 Mon Sep 17 00:00:00 2001 From: Gaspard Petit Date: Fri, 7 Jun 2024 21:59:46 -0400 Subject: [PATCH] Updated libcurl implementation --- result/result/decode-msvc1940.js | 696 +++++++++++++++---------------- result/result/encode-msvc1940.js | 672 ++++++++++++++--------------- src/libcurl/curl_base64.cpp | 526 +++++++++++------------ src/libcurl/curl_base64.h | 11 +- src/libcurl/test_libcurl.cpp | 14 +- 5 files changed, 963 insertions(+), 956 deletions(-) diff --git a/result/result/decode-msvc1940.js b/result/result/decode-msvc1940.js index 7ae0774..f14bbe5 100644 --- a/result/result/decode-msvc1940.js +++ b/result/result/decode-msvc1940.js @@ -1,436 +1,436 @@ var decode_result_msvc1940 = [ {name:'Adition', values:[ - {len:32,time:0.0584339}, - {len:64,time:0.10805}, - {len:128,time:0.0901989}, - {len:256,time:0.124665}, - {len:512,time:0.201113}, - {len:1024,time:0.354353}, - {len:2048,time:0.635431}, - {len:4096,time:1.20581}, - {len:8192,time:2.35587}, - {len:16384,time:4.68788}, - {len:32768,time:9.39286}, - {len:65536,time:18.6142} + {len:32,time:0.0572999}, + {len:64,time:0.0663179}, + {len:128,time:0.0827899}, + {len:256,time:0.121288}, + {len:512,time:0.195469}, + {len:1024,time:0.337782}, + {len:2048,time:0.621797}, + {len:4096,time:1.19666}, + {len:8192,time:2.32231}, + {len:16384,time:4.6602}, + {len:32768,time:9.17403}, + {len:65536,time:18.6468} ]}, {name:'AdpGmbh', values:[ - {len:32,time:0.113806}, - {len:64,time:0.170686}, - {len:128,time:0.258554}, - {len:256,time:0.458981}, - {len:512,time:0.875565}, - {len:1024,time:1.64363}, - {len:2048,time:3.20582}, - {len:4096,time:6.41767}, - {len:8192,time:17.6416}, - {len:16384,time:87.9747}, - {len:32768,time:203.743}, - {len:65536,time:438.407} + {len:32,time:0.0906719}, + {len:64,time:0.140904}, + {len:128,time:0.253628}, + {len:256,time:0.446915}, + {len:512,time:0.892846}, + {len:1024,time:1.68495}, + {len:2048,time:3.34558}, + {len:4096,time:6.64766}, + {len:8192,time:21.6824}, + {len:16384,time:89.6432}, + {len:32768,time:208.797}, + {len:65536,time:432.562} ]}, {name:'Apache', values:[ - {len:32,time:0.0710339}, - {len:64,time:0.101969}, - {len:128,time:0.160109}, - {len:256,time:0.2539}, - {len:512,time:0.451409}, - {len:1024,time:0.853234}, - {len:2048,time:1.60662}, - {len:4096,time:3.1556}, - {len:8192,time:6.23817}, - {len:16384,time:12.5233}, - {len:32768,time:26.1522}, - {len:65536,time:51.8108} + {len:32,time:0.0694779}, + {len:64,time:0.106332}, + {len:128,time:0.157299}, + {len:256,time:0.254791}, + {len:512,time:0.446617}, + {len:1024,time:0.841197}, + {len:2048,time:1.60277}, + {len:4096,time:3.15847}, + {len:8192,time:6.26755}, + {len:16384,time:12.5746}, + {len:32768,time:25.6591}, + {len:65536,time:51.4765} ]}, {name:'Arduino', values:[ - {len:32,time:0.0908929}, - {len:64,time:0.14483}, - {len:128,time:0.247239}, - {len:256,time:0.455748}, - {len:512,time:0.869983}, - {len:1024,time:1.6882}, - {len:2048,time:3.29714}, - {len:4096,time:6.57336}, - {len:8192,time:25.7276}, - {len:16384,time:78.3348}, - {len:32768,time:180.047}, - {len:65536,time:383.157} + {len:32,time:0.0863239}, + {len:64,time:0.137011}, + {len:128,time:0.22747}, + {len:256,time:0.415657}, + {len:512,time:0.805248}, + {len:1024,time:1.54219}, + {len:2048,time:3.07183}, + {len:4096,time:14.1344}, + {len:8192,time:40.9726}, + {len:16384,time:90.8672}, + {len:32768,time:191.157}, + {len:65536,time:389.661} ]}, {name:'Boost', values:[ - {len:32,time:0.180758}, - {len:64,time:0.310166}, - {len:128,time:0.55212}, - {len:256,time:1.01073}, - {len:512,time:1.87107}, - {len:1024,time:3.46764}, - {len:2048,time:6.78059}, - {len:4096,time:12.9546}, - {len:8192,time:25.2977}, - {len:16384,time:51.4163}, - {len:32768,time:100.887}, - {len:65536,time:201.41} + {len:32,time:0.181005}, + {len:64,time:0.307068}, + {len:128,time:0.550982}, + {len:256,time:1.03838}, + {len:512,time:1.84325}, + {len:1024,time:3.48945}, + {len:2048,time:6.73595}, + {len:4096,time:13.062}, + {len:8192,time:25.5219}, + {len:16384,time:50.6632}, + {len:32768,time:100.466}, + {len:65536,time:201.018} ]}, {name:'CppCodec', values:[ - {len:32,time:0.0814419}, - {len:64,time:0.107233}, - {len:128,time:0.151677}, - {len:256,time:0.248474}, - {len:512,time:0.439642}, - {len:1024,time:0.831005}, - {len:2048,time:1.61148}, - {len:4096,time:3.12637}, - {len:8192,time:6.43143}, - {len:16384,time:12.712}, - {len:32768,time:25.6307}, - {len:65536,time:51.0209} + {len:32,time:0.0729519}, + {len:64,time:0.100166}, + {len:128,time:0.143579}, + {len:256,time:0.232417}, + {len:512,time:0.410327}, + {len:1024,time:0.771223}, + {len:2048,time:1.47426}, + {len:4096,time:2.89797}, + {len:8192,time:5.84846}, + {len:16384,time:12.3539}, + {len:32768,time:22.8091}, + {len:65536,time:45.598} ]}, {name:'DaedalusAlpha', values:[ - {len:32,time:0.113691}, - {len:64,time:0.156148}, - {len:128,time:0.229516}, - {len:256,time:0.385484}, - {len:512,time:0.69775}, - {len:1024,time:1.30021}, - {len:2048,time:2.52349}, - {len:4096,time:4.93009}, - {len:8192,time:9.786}, - {len:16384,time:19.3019}, - {len:32768,time:38.3493}, - {len:65536,time:77.5212} + {len:32,time:0.1136}, + {len:64,time:0.151479}, + {len:128,time:0.228748}, + {len:256,time:0.38213}, + {len:512,time:0.680131}, + {len:1024,time:1.28732}, + {len:2048,time:2.52029}, + {len:4096,time:5.18057}, + {len:8192,time:9.78598}, + {len:16384,time:19.6546}, + {len:32768,time:39.2508}, + {len:65536,time:79.4465} ]}, {name:'ElegantDice', values:[ - {len:32,time:0.0894499}, - {len:64,time:0.128493}, - {len:128,time:0.203352}, - {len:256,time:0.353657}, - {len:512,time:0.654718}, - {len:1024,time:1.26946}, - {len:2048,time:2.69805}, - {len:4096,time:4.88387}, - {len:8192,time:9.71689}, - {len:16384,time:19.4383}, - {len:32768,time:38.8606}, - {len:65536,time:78.5169} + {len:32,time:0.0902559}, + {len:64,time:0.130357}, + {len:128,time:0.20427}, + {len:256,time:0.355932}, + {len:512,time:0.656037}, + {len:1024,time:1.26504}, + {len:2048,time:2.47169}, + {len:4096,time:5.12996}, + {len:8192,time:9.68043}, + {len:16384,time:19.4276}, + {len:32768,time:38.5788}, + {len:65536,time:76.9586} ]}, {name:'Gnome', values:[ - {len:32,time:0.0916649}, - {len:64,time:0.121778}, - {len:128,time:0.175672}, - {len:256,time:0.288545}, - {len:512,time:0.506426}, - {len:1024,time:0.969652}, - {len:2048,time:1.84136}, - {len:4096,time:3.604}, - {len:8192,time:7.62329}, - {len:16384,time:15.4674}, - {len:32768,time:29.7233}, - {len:65536,time:61.3698} + {len:32,time:0.0797549}, + {len:64,time:0.119291}, + {len:128,time:0.174276}, + {len:256,time:0.286797}, + {len:512,time:0.506543}, + {len:1024,time:0.957229}, + {len:2048,time:1.84065}, + {len:4096,time:3.64944}, + {len:8192,time:7.36128}, + {len:16384,time:14.946}, + {len:32768,time:28.8527}, + {len:65536,time:57.846} ]}, {name:'InternetSoftwareConsortium', values:[ - {len:32,time:0.152428}, - {len:64,time:0.26725}, - {len:128,time:0.486425}, - {len:256,time:0.9416}, - {len:512,time:1.80332}, - {len:1024,time:3.55787}, - {len:2048,time:7.11919}, - {len:4096,time:14.6527}, - {len:8192,time:56.0365}, - {len:16384,time:142.645}, - {len:32768,time:310.279}, - {len:65536,time:637.324} + {len:32,time:0.162213}, + {len:64,time:0.287426}, + {len:128,time:0.547233}, + {len:256,time:1.02673}, + {len:512,time:1.99432}, + {len:1024,time:3.90776}, + {len:2048,time:7.72213}, + {len:4096,time:15.8876}, + {len:8192,time:58.1725}, + {len:16384,time:145.517}, + {len:32768,time:315.023}, + {len:65536,time:655.924} ]}, {name:'JouniMalinen', values:[ - {len:32,time:0.0847399}, - {len:64,time:0.134129}, - {len:128,time:0.21222}, - {len:256,time:0.36299}, - {len:512,time:0.670167}, - {len:1024,time:1.30915}, - {len:2048,time:2.4806}, - {len:4096,time:4.91439}, - {len:8192,time:9.79777}, - {len:16384,time:19.5296}, - {len:32768,time:38.8922}, - {len:65536,time:79.2073} + {len:32,time:0.0969619}, + {len:64,time:0.141053}, + {len:128,time:0.221466}, + {len:256,time:0.390129}, + {len:512,time:0.697481}, + {len:1024,time:1.35665}, + {len:2048,time:2.60798}, + {len:4096,time:5.11942}, + {len:8192,time:10.3497}, + {len:16384,time:21.922}, + {len:32768,time:41.6897}, + {len:65536,time:83.8953} ]}, {name:'LibCurl', values:[ - {len:32,time:0.341884}, - {len:64,time:0.752504}, - {len:128,time:1.72394}, - {len:256,time:4.26511}, - {len:512,time:9.19106}, - {len:1024,time:19.1109}, - {len:2048,time:39.2487}, - {len:4096,time:83.7144}, - {len:8192,time:168.765}, - {len:16384,time:342.058}, - {len:32768,time:680.694}, - {len:65536,time:1358.36} + {len:32,time:0.0883229}, + {len:64,time:0.121502}, + {len:128,time:0.163904}, + {len:256,time:0.24645}, + {len:512,time:0.399481}, + {len:1024,time:0.739153}, + {len:2048,time:1.38157}, + {len:4096,time:2.74851}, + {len:8192,time:5.06924}, + {len:16384,time:9.95512}, + {len:32768,time:20.1261}, + {len:65536,time:40.2537} ]}, {name:'Libb64', values:[ - {len:32,time:0.627795}, - {len:64,time:0.691928}, - {len:128,time:0.776506}, - {len:256,time:0.896631}, - {len:512,time:1.10399}, - {len:1024,time:1.48081}, - {len:2048,time:2.19169}, - {len:4096,time:3.56806}, - {len:8192,time:6.64757}, - {len:16384,time:12.5554}, - {len:32768,time:25.8287}, - {len:65536,time:53.9169} + {len:32,time:0.627083}, + {len:64,time:0.69196}, + {len:128,time:0.793229}, + {len:256,time:0.911653}, + {len:512,time:1.10109}, + {len:1024,time:1.50019}, + {len:2048,time:2.2094}, + {len:4096,time:3.65948}, + {len:8192,time:6.65595}, + {len:16384,time:12.713}, + {len:32768,time:26.6488}, + {len:65536,time:54.9488} ]}, {name:'LihO', values:[ - {len:32,time:0.268803}, - {len:64,time:0.488244}, - {len:128,time:0.929295}, - {len:256,time:1.70435}, - {len:512,time:3.32806}, - {len:1024,time:6.65832}, - {len:2048,time:14.6465}, - {len:4096,time:35.565}, - {len:8192,time:85.4282}, - {len:16384,time:191.752}, - {len:32768,time:400.276}, - {len:65536,time:806.296} + {len:32,time:0.2687}, + {len:64,time:0.509028}, + {len:128,time:0.963207}, + {len:256,time:1.77721}, + {len:512,time:3.39863}, + {len:1024,time:6.96746}, + {len:2048,time:15.387}, + {len:4096,time:36.9199}, + {len:8192,time:87.9734}, + {len:16384,time:197.469}, + {len:32768,time:432.81}, + {len:65536,time:829.836} ]}, {name:'ManuelMartinez', values:[ - {len:32,time:0.132484}, - {len:64,time:0.186399}, - {len:128,time:0.295365}, - {len:256,time:0.477444}, - {len:512,time:0.737067}, - {len:1024,time:1.3021}, - {len:2048,time:2.28328}, - {len:4096,time:4.21032}, - {len:8192,time:7.95947}, - {len:16384,time:15.3965}, - {len:32768,time:30.4318}, - {len:65536,time:59.5754} + {len:32,time:0.13365}, + {len:64,time:0.188039}, + {len:128,time:0.299373}, + {len:256,time:0.480903}, + {len:512,time:0.772811}, + {len:1024,time:1.28545}, + {len:2048,time:2.32972}, + {len:4096,time:4.27684}, + {len:8192,time:8.09307}, + {len:16384,time:16.0005}, + {len:32768,time:30.428}, + {len:65536,time:59.8271} ]}, {name:'ModpB64Chromium', values:[ - {len:32,time:0.0505859}, - {len:64,time:0.0571269}, - {len:128,time:0.0776629}, - {len:256,time:0.103938}, - {len:512,time:0.157435}, - {len:1024,time:0.268592}, - {len:2048,time:0.479784}, - {len:4096,time:0.910413}, - {len:8192,time:1.79152}, - {len:16384,time:3.49551}, - {len:32768,time:7.20001}, - {len:65536,time:14.2388} + {len:32,time:0.0512309}, + {len:64,time:0.0586609}, + {len:128,time:0.0723579}, + {len:256,time:0.0975209}, + {len:512,time:0.149539}, + {len:1024,time:0.263293}, + {len:2048,time:0.470539}, + {len:4096,time:0.898019}, + {len:8192,time:1.74045}, + {len:16384,time:3.47268}, + {len:32768,time:7.04876}, + {len:65536,time:14.2064} ]}, {name:'NibbleAndAHalf', values:[ - {len:32,time:0.0526419}, - {len:64,time:0.0607469}, - {len:128,time:0.0776159}, - {len:256,time:0.107977}, - {len:512,time:0.171394}, - {len:1024,time:0.305073}, - {len:2048,time:0.552235}, - {len:4096,time:1.04605}, - {len:8192,time:2.0818}, - {len:16384,time:4.09991}, - {len:32768,time:8.24258}, - {len:65536,time:16.2987} + {len:32,time:0.0534069}, + {len:64,time:0.0633469}, + {len:128,time:0.0789599}, + {len:256,time:0.109754}, + {len:512,time:0.174962}, + {len:1024,time:0.314847}, + {len:2048,time:0.573775}, + {len:4096,time:1.07783}, + {len:8192,time:2.29159}, + {len:16384,time:4.22751}, + {len:32768,time:8.69268}, + {len:65536,time:16.8234} ]}, {name:'Polfosol', values:[ - {len:32,time:0.0783579}, - {len:64,time:0.0677769}, - {len:128,time:0.127581}, - {len:256,time:0.142066}, - {len:512,time:0.274971}, - {len:1024,time:0.445218}, - {len:2048,time:0.865685}, - {len:4096,time:1.59901}, - {len:8192,time:3.26951}, - {len:16384,time:6.22133}, - {len:32768,time:12.9751}, - {len:65536,time:24.9504} + {len:32,time:0.0805209}, + {len:64,time:0.0695449}, + {len:128,time:0.128963}, + {len:256,time:0.145414}, + {len:512,time:0.284729}, + {len:1024,time:0.450046}, + {len:2048,time:0.896273}, + {len:4096,time:1.64173}, + {len:8192,time:3.3603}, + {len:16384,time:6.33846}, + {len:32768,time:13.2964}, + {len:65536,time:25.2939} ]}, {name:'Polfosol_IMUtility', values:[ - {len:32,time:0.0553849}, - {len:64,time:0.0601029}, - {len:128,time:0.0777379}, - {len:256,time:0.105638}, - {len:512,time:0.161948}, - {len:1024,time:0.28533}, - {len:2048,time:0.524846}, - {len:4096,time:0.981424}, - {len:8192,time:1.92472}, - {len:16384,time:3.83281}, - {len:32768,time:7.72294}, - {len:65536,time:15.2803} + {len:32,time:0.0575969}, + {len:64,time:0.0655589}, + {len:128,time:0.0820289}, + {len:256,time:0.112924}, + {len:512,time:0.176222}, + {len:1024,time:0.300551}, + {len:2048,time:0.537471}, + {len:4096,time:1.03203}, + {len:8192,time:1.99397}, + {len:16384,time:4.00174}, + {len:32768,time:8.04489}, + {len:65536,time:15.9907} ]}, {name:'Polfosol_mod', values:[ - {len:32,time:0.0605869}, - {len:64,time:0.0716089}, - {len:128,time:0.0982859}, - {len:256,time:0.143808}, - {len:512,time:0.245066}, - {len:1024,time:0.467223}, - {len:2048,time:0.855609}, - {len:4096,time:1.60837}, - {len:8192,time:3.16144}, - {len:16384,time:6.27988}, - {len:32768,time:12.4611}, - {len:65536,time:25.2389} + {len:32,time:0.0592479}, + {len:64,time:0.0721979}, + {len:128,time:0.0972659}, + {len:256,time:0.1484}, + {len:512,time:0.241256}, + {len:1024,time:0.49672}, + {len:2048,time:0.865097}, + {len:4096,time:1.63961}, + {len:8192,time:3.26128}, + {len:16384,time:6.46562}, + {len:32768,time:12.8462}, + {len:65536,time:25.4168} ]}, {name:'TomyKaria', values:[ - {len:32,time:0.0807639}, - {len:64,time:0.111141}, - {len:128,time:0.168033}, - {len:256,time:0.283053}, - {len:512,time:0.509968}, - {len:1024,time:0.950301}, - {len:2048,time:1.85947}, - {len:4096,time:3.59124}, - {len:8192,time:7.31691}, - {len:16384,time:14.3374}, - {len:32768,time:28.7454}, - {len:65536,time:57.6213} + {len:32,time:0.0820289}, + {len:64,time:0.113362}, + {len:128,time:0.166844}, + {len:256,time:0.279764}, + {len:512,time:0.50196}, + {len:1024,time:0.954182}, + {len:2048,time:1.87955}, + {len:4096,time:3.61621}, + {len:8192,time:7.27372}, + {len:16384,time:14.6437}, + {len:32768,time:29.2418}, + {len:65536,time:57.8224} ]}, {name:'Turbob64', values:[ - {len:32,time:0.047521}, - {len:64,time:0.049935}, - {len:128,time:0.0542989}, - {len:256,time:0.0563969}, - {len:512,time:0.0670639}, - {len:1024,time:0.0810239}, - {len:2048,time:0.112809}, - {len:4096,time:0.164754}, - {len:8192,time:0.305643}, - {len:16384,time:0.553628}, - {len:32768,time:1.50966}, - {len:65536,time:2.85229} + {len:32,time:0.048882}, + {len:64,time:0.0503939}, + {len:128,time:0.0559529}, + {len:256,time:0.0557769}, + {len:512,time:0.0680889}, + {len:1024,time:0.0830169}, + {len:2048,time:0.112264}, + {len:4096,time:0.168318}, + {len:8192,time:0.316223}, + {len:16384,time:0.566285}, + {len:32768,time:1.36866}, + {len:65536,time:2.82083} ]}, {name:'User152949', values:[ - {len:32,time:1.62272}, - {len:64,time:2.93531}, - {len:128,time:5.44216}, - {len:256,time:10.3512}, - {len:512,time:20.2856}, - {len:1024,time:40.683}, - {len:2048,time:80.8923}, - {len:4096,time:162.553}, - {len:8192,time:322.48}, - {len:16384,time:655.324}, - {len:32768,time:1303.98}, - {len:65536,time:2588.36} + {len:32,time:1.61715}, + {len:64,time:2.90034}, + {len:128,time:5.38024}, + {len:256,time:10.5962}, + {len:512,time:20.47}, + {len:1024,time:40.4762}, + {len:2048,time:79.9096}, + {len:4096,time:159.99}, + {len:8192,time:318.86}, + {len:16384,time:634.06}, + {len:32768,time:1272.52}, + {len:65536,time:2625.84} ]}, {name:'WikibooksOrgC', values:[ - {len:32,time:0.0805989}, - {len:64,time:0.1067}, - {len:128,time:0.160536}, - {len:256,time:0.263769}, - {len:512,time:0.476706}, - {len:1024,time:0.899999}, - {len:2048,time:1.75521}, - {len:4096,time:3.43809}, - {len:8192,time:6.84195}, - {len:16384,time:13.7448}, - {len:32768,time:27.3749}, - {len:65536,time:54.5017} + {len:32,time:0.0878209}, + {len:64,time:0.115554}, + {len:128,time:0.166082}, + {len:256,time:0.273852}, + {len:512,time:0.485395}, + {len:1024,time:0.946823}, + {len:2048,time:1.78279}, + {len:4096,time:3.49691}, + {len:8192,time:7.11258}, + {len:16384,time:15.2104}, + {len:32768,time:28.1369}, + {len:65536,time:55.4664} ]}, {name:'WikibooksOrgCpp', values:[ - {len:32,time:0.126699}, - {len:64,time:0.190243}, - {len:128,time:0.297024}, - {len:256,time:0.51876}, - {len:512,time:0.997508}, - {len:1024,time:1.88345}, - {len:2048,time:3.84333}, - {len:4096,time:10.9501}, - {len:8192,time:40.207}, - {len:16384,time:90.2311}, - {len:32768,time:185.74}, - {len:65536,time:389.718} + {len:32,time:0.119207}, + {len:64,time:0.174116}, + {len:128,time:0.282271}, + {len:256,time:0.464873}, + {len:512,time:0.865464}, + {len:1024,time:1.64107}, + {len:2048,time:3.2317}, + {len:4096,time:6.51741}, + {len:8192,time:29.2757}, + {len:16384,time:88.5458}, + {len:32768,time:192.052}, + {len:65536,time:397.858} ]}, {name:'base64aklomp', values:[ - {len:32,time:0.0854569}, - {len:64,time:0.0651129}, - {len:128,time:0.0910029}, - {len:256,time:0.0752869}, - {len:512,time:0.108482}, - {len:1024,time:0.110575}, - {len:2048,time:0.18067}, - {len:4096,time:0.244895}, - {len:8192,time:0.461438}, - {len:16384,time:0.834812}, - {len:32768,time:1.85536}, - {len:65536,time:4.08469} + {len:32,time:0.0867859}, + {len:64,time:0.0666769}, + {len:128,time:0.0907599}, + {len:256,time:0.0740139}, + {len:512,time:0.111022}, + {len:1024,time:0.112627}, + {len:2048,time:0.182031}, + {len:4096,time:0.253196}, + {len:8192,time:0.475787}, + {len:16384,time:0.839009}, + {len:32768,time:1.91199}, + {len:65536,time:4.52666} ]}, {name:'base64ppwrap', values:[ - {len:32,time:0.215368}, - {len:64,time:0.265772}, - {len:128,time:0.358119}, - {len:256,time:0.52143}, - {len:512,time:0.805916}, - {len:1024,time:1.37}, - {len:2048,time:2.29826}, - {len:4096,time:4.56255}, - {len:8192,time:8.09426}, - {len:16384,time:16.0553}, - {len:32768,time:31.6911}, - {len:65536,time:64.2214} + {len:32,time:0.217552}, + {len:64,time:0.262006}, + {len:128,time:0.363765}, + {len:256,time:0.530895}, + {len:512,time:0.820965}, + {len:1024,time:1.378}, + {len:2048,time:2.34584}, + {len:4096,time:4.4853}, + {len:8192,time:8.34329}, + {len:16384,time:16.3205}, + {len:32768,time:32.0475}, + {len:65536,time:64.164} ]}, {name:'base64tl', values:[ - {len:32,time:0.0650279}, - {len:64,time:0.0637009}, - {len:128,time:0.0800739}, - {len:256,time:0.108812}, - {len:512,time:0.162613}, - {len:1024,time:0.281022}, - {len:2048,time:0.495968}, - {len:4096,time:0.933355}, - {len:8192,time:1.81521}, - {len:16384,time:3.59012}, - {len:32768,time:7.26295}, - {len:65536,time:14.2964} + {len:32,time:0.0583999}, + {len:64,time:0.0641489}, + {len:128,time:0.0847739}, + {len:256,time:0.110865}, + {len:512,time:0.166732}, + {len:1024,time:0.277524}, + {len:2048,time:0.496697}, + {len:4096,time:0.936205}, + {len:8192,time:1.84305}, + {len:16384,time:3.63406}, + {len:32768,time:7.28667}, + {len:65536,time:14.4865} ]}, {name:'picobase64', values:[ - {len:32,time:0.0568229}, - {len:64,time:0.0652849}, - {len:128,time:0.0830019}, - {len:256,time:0.123526}, - {len:512,time:0.190348}, - {len:1024,time:0.33737}, - {len:2048,time:0.613869}, - {len:4096,time:1.17572}, - {len:8192,time:2.3443}, - {len:16384,time:4.63437}, - {len:32768,time:9.1557}, - {len:65536,time:18.384} + {len:32,time:0.0564849}, + {len:64,time:0.0702469}, + {len:128,time:0.0901209}, + {len:256,time:0.126596}, + {len:512,time:0.197883}, + {len:1024,time:0.342754}, + {len:2048,time:0.625987}, + {len:4096,time:1.20772}, + {len:8192,time:2.37637}, + {len:16384,time:4.68647}, + {len:32768,time:9.32986}, + {len:65536,time:18.8466} ]}] diff --git a/result/result/encode-msvc1940.js b/result/result/encode-msvc1940.js index d616f47..52d4704 100644 --- a/result/result/encode-msvc1940.js +++ b/result/result/encode-msvc1940.js @@ -1,421 +1,421 @@ var encode_result_msvc1940 = [ {name:'Adition', values:[ - {len:32,time:0.0570819}, - {len:64,time:0.0727649}, - {len:128,time:0.0841999}, - {len:256,time:0.124089}, - {len:512,time:0.192909}, - {len:1024,time:0.350037}, - {len:2048,time:0.629858}, - {len:4096,time:1.21269}, - {len:8192,time:2.43126}, - {len:16384,time:4.72671}, - {len:32768,time:9.85499}, - {len:65536,time:22.1745} + {len:32,time:0.0585309}, + {len:64,time:0.0692139}, + {len:128,time:0.0841279}, + {len:256,time:0.129525}, + {len:512,time:0.195361}, + {len:1024,time:0.365101}, + {len:2048,time:0.649017}, + {len:4096,time:1.25528}, + {len:8192,time:2.47085}, + {len:16384,time:4.89028}, + {len:32768,time:9.70177}, + {len:65536,time:19.4703} ]}, {name:'AdpGmbh', values:[ - {len:32,time:0.0729089}, - {len:64,time:0.100918}, - {len:128,time:0.151608}, - {len:256,time:0.255106}, - {len:512,time:0.456679}, - {len:1024,time:0.873448}, - {len:2048,time:1.69098}, - {len:4096,time:3.30687}, - {len:8192,time:6.61402}, - {len:16384,time:13.1747}, - {len:32768,time:26.1488}, - {len:65536,time:54.2657} + {len:32,time:0.0747209}, + {len:64,time:0.10131}, + {len:128,time:0.15226}, + {len:256,time:0.261266}, + {len:512,time:0.470964}, + {len:1024,time:0.883614}, + {len:2048,time:1.69838}, + {len:4096,time:3.36275}, + {len:8192,time:6.78431}, + {len:16384,time:13.6299}, + {len:32768,time:27.2417}, + {len:65536,time:57.8706} ]}, {name:'Apache', values:[ - {len:32,time:0.0547359}, - {len:64,time:0.0714249}, - {len:128,time:0.0818709}, - {len:256,time:0.122308}, - {len:512,time:0.187484}, - {len:1024,time:0.34346}, - {len:2048,time:0.62648}, - {len:4096,time:1.21191}, - {len:8192,time:2.39737}, - {len:16384,time:4.69722}, - {len:32768,time:9.49145}, - {len:65536,time:21.8246} + {len:32,time:0.0551059}, + {len:64,time:0.0699489}, + {len:128,time:0.0826689}, + {len:256,time:0.128413}, + {len:512,time:0.195635}, + {len:1024,time:0.349113}, + {len:2048,time:0.640454}, + {len:4096,time:1.24322}, + {len:8192,time:2.49464}, + {len:16384,time:4.83628}, + {len:32768,time:9.73229}, + {len:65536,time:22.4187} ]}, {name:'Arduino', values:[ - {len:32,time:0.0791759}, - {len:64,time:0.116932}, - {len:128,time:0.162019}, - {len:256,time:0.28011}, - {len:512,time:0.493535}, - {len:1024,time:0.946599}, - {len:2048,time:1.82459}, - {len:4096,time:3.60611}, - {len:8192,time:7.19719}, - {len:16384,time:14.4727}, - {len:32768,time:28.7766}, - {len:65536,time:60.6754} + {len:32,time:0.0816159}, + {len:64,time:0.115505}, + {len:128,time:0.164673}, + {len:256,time:0.285851}, + {len:512,time:0.503769}, + {len:1024,time:0.95786}, + {len:2048,time:1.86248}, + {len:4096,time:3.69526}, + {len:8192,time:7.36448}, + {len:16384,time:14.7691}, + {len:32768,time:29.3266}, + {len:65536,time:61.6027} ]}, {name:'Boost', values:[ - {len:32,time:0.256565}, - {len:64,time:0.433202}, - {len:128,time:0.788261}, - {len:256,time:1.39945}, - {len:512,time:2.61866}, - {len:1024,time:4.98293}, - {len:2048,time:9.69513}, - {len:4096,time:18.8544}, - {len:8192,time:37.2462}, - {len:16384,time:74.1887}, - {len:32768,time:151.608}, - {len:65536,time:314.629} + {len:32,time:0.249432}, + {len:64,time:0.44291}, + {len:128,time:0.801159}, + {len:256,time:1.42098}, + {len:512,time:2.68789}, + {len:1024,time:5.05365}, + {len:2048,time:9.78235}, + {len:4096,time:19.1324}, + {len:8192,time:37.7865}, + {len:16384,time:74.9213}, + {len:32768,time:152.237}, + {len:65536,time:321.519} ]}, {name:'CppCodec', values:[ - {len:32,time:0.0637219}, - {len:64,time:0.0898839}, - {len:128,time:0.113196}, - {len:256,time:0.196289}, - {len:512,time:0.306284}, - {len:1024,time:0.578017}, - {len:2048,time:1.08356}, - {len:4096,time:2.16579}, - {len:8192,time:4.28235}, - {len:16384,time:8.62167}, - {len:32768,time:18.4922}, - {len:65536,time:38.1308} + {len:32,time:0.0629409}, + {len:64,time:0.0855249}, + {len:128,time:0.115075}, + {len:256,time:0.189803}, + {len:512,time:0.309407}, + {len:1024,time:0.596204}, + {len:2048,time:1.10073}, + {len:4096,time:2.20147}, + {len:8192,time:4.2837}, + {len:16384,time:8.71997}, + {len:32768,time:18.7588}, + {len:65536,time:40.946} ]}, {name:'DaedalusAlpha', values:[ - {len:32,time:0.0788419}, - {len:64,time:0.112962}, - {len:128,time:0.170201}, - {len:256,time:0.289273}, - {len:512,time:0.531931}, - {len:1024,time:1.02989}, - {len:2048,time:1.96733}, - {len:4096,time:3.87883}, - {len:8192,time:7.67821}, - {len:16384,time:15.2571}, - {len:32768,time:30.2719}, - {len:65536,time:61.3717} + {len:32,time:0.0802339}, + {len:64,time:0.112032}, + {len:128,time:0.171569}, + {len:256,time:0.297243}, + {len:512,time:0.532883}, + {len:1024,time:1.01727}, + {len:2048,time:1.9772}, + {len:4096,time:3.87996}, + {len:8192,time:7.76309}, + {len:16384,time:15.5072}, + {len:32768,time:33.3147}, + {len:65536,time:63.7566} ]}, {name:'ElegantDice', values:[ - {len:32,time:0.0793569}, - {len:64,time:0.116278}, - {len:128,time:0.171041}, - {len:256,time:0.290547}, - {len:512,time:0.540089}, - {len:1024,time:1.01602}, - {len:2048,time:1.94979}, - {len:4096,time:3.85963}, - {len:8192,time:7.71114}, - {len:16384,time:15.3173}, - {len:32768,time:30.7548}, - {len:65536,time:60.779} + {len:32,time:0.0804029}, + {len:64,time:0.110698}, + {len:128,time:0.179738}, + {len:256,time:0.295846}, + {len:512,time:0.525943}, + {len:1024,time:1.00914}, + {len:2048,time:1.94632}, + {len:4096,time:3.8655}, + {len:8192,time:7.71904}, + {len:16384,time:15.3995}, + {len:32768,time:30.7169}, + {len:65536,time:64.1237} ]}, {name:'Gnome', values:[ - {len:32,time:0.0953229}, - {len:64,time:0.118932}, - {len:128,time:0.158169}, - {len:256,time:0.243826}, - {len:512,time:0.381679}, - {len:1024,time:0.690073}, - {len:2048,time:1.26835}, - {len:4096,time:2.49713}, - {len:8192,time:4.90181}, - {len:16384,time:9.70789}, - {len:32768,time:19.8666}, - {len:65536,time:45.2042} + {len:32,time:0.0930369}, + {len:64,time:0.115695}, + {len:128,time:0.160794}, + {len:256,time:0.246467}, + {len:512,time:0.382084}, + {len:1024,time:0.691307}, + {len:2048,time:1.28286}, + {len:4096,time:2.50371}, + {len:8192,time:4.95197}, + {len:16384,time:9.72539}, + {len:32768,time:22.7574}, + {len:65536,time:48.7} ]}, {name:'InternetSoftwareConsortium', values:[ - {len:32,time:0.0587799}, - {len:64,time:0.0777239}, - {len:128,time:0.0930849}, - {len:256,time:0.145471}, - {len:512,time:0.226361}, - {len:1024,time:0.417674}, - {len:2048,time:0.764119}, - {len:4096,time:1.55506}, - {len:8192,time:2.97431}, - {len:16384,time:5.75941}, - {len:32768,time:11.7144}, - {len:65536,time:23.4616} + {len:32,time:0.0581859}, + {len:64,time:0.0807579}, + {len:128,time:0.0977969}, + {len:256,time:0.149193}, + {len:512,time:0.23074}, + {len:1024,time:0.410569}, + {len:2048,time:0.761658}, + {len:4096,time:1.4897}, + {len:8192,time:2.94105}, + {len:16384,time:5.73922}, + {len:32768,time:11.5138}, + {len:65536,time:24.5525} ]}, {name:'JouniMalinen', values:[ - {len:32,time:0.0548069}, - {len:64,time:0.0738899}, - {len:128,time:0.0883569}, - {len:256,time:0.129038}, - {len:512,time:0.20487}, - {len:1024,time:0.375288}, - {len:2048,time:0.689301}, - {len:4096,time:1.32657}, - {len:8192,time:2.66328}, - {len:16384,time:5.06252}, - {len:32768,time:10.4208}, - {len:65536,time:20.5116} + {len:32,time:0.0550709}, + {len:64,time:0.0704859}, + {len:128,time:0.0855649}, + {len:256,time:0.131004}, + {len:512,time:0.200978}, + {len:1024,time:0.364435}, + {len:2048,time:0.667373}, + {len:4096,time:1.3104}, + {len:8192,time:2.58244}, + {len:16384,time:4.91636}, + {len:32768,time:9.98963}, + {len:65536,time:21.5713} ]}, {name:'LibCurl', values:[ - {len:32,time:0.567019}, - {len:64,time:1.08992}, - {len:128,time:2.09679}, - {len:256,time:4.11008}, - {len:512,time:8.19386}, - {len:1024,time:16.0841}, - {len:2048,time:32.183}, - {len:4096,time:65.2904}, - {len:8192,time:130.819}, - {len:16384,time:261.065}, - {len:32768,time:517.719}, - {len:65536,time:1037.05} + {len:32,time:0.0763219}, + {len:64,time:0.0859539}, + {len:128,time:0.105819}, + {len:256,time:0.150825}, + {len:512,time:0.213577}, + {len:1024,time:0.3698}, + {len:2048,time:0.666785}, + {len:4096,time:1.27441}, + {len:8192,time:2.48746}, + {len:16384,time:4.95837}, + {len:32768,time:11.2932}, + {len:65536,time:27.0455} ]}, {name:'Libb64', values:[ - {len:32,time:0.969456}, - {len:64,time:1.02906}, - {len:128,time:1.0267}, - {len:256,time:1.12581}, - {len:512,time:1.13901}, - {len:1024,time:1.48297}, - {len:2048,time:2.06284}, - {len:4096,time:3.38537}, - {len:8192,time:6.26208}, - {len:16384,time:15.5798}, - {len:32768,time:28.2609}, - {len:65536,time:53.8708} + {len:32,time:0.808441}, + {len:64,time:0.857194}, + {len:128,time:0.930742}, + {len:256,time:1.07885}, + {len:512,time:1.21574}, + {len:1024,time:1.43256}, + {len:2048,time:2.09542}, + {len:4096,time:3.44826}, + {len:8192,time:6.42949}, + {len:16384,time:13.5062}, + {len:32768,time:28.4259}, + {len:65536,time:53.754} ]}, {name:'LihO', values:[ - {len:32,time:0.115473}, - {len:64,time:0.214289}, - {len:128,time:0.355004}, - {len:256,time:0.58131}, - {len:512,time:1.02998}, - {len:1024,time:1.87875}, - {len:2048,time:3.40949}, - {len:4096,time:6.55877}, - {len:8192,time:12.521}, - {len:16384,time:24.7239}, - {len:32768,time:48.6554}, - {len:65536,time:97.8485} + {len:32,time:0.114931}, + {len:64,time:0.213353}, + {len:128,time:0.359533}, + {len:256,time:0.579472}, + {len:512,time:1.02267}, + {len:1024,time:1.85342}, + {len:2048,time:3.46047}, + {len:4096,time:6.51267}, + {len:8192,time:12.6214}, + {len:16384,time:24.9739}, + {len:32768,time:48.8387}, + {len:65536,time:98.8476} ]}, {name:'ManuelMartinez', values:[ - {len:32,time:0.116934}, - {len:64,time:0.221267}, - {len:128,time:0.3958}, - {len:256,time:0.691597}, - {len:512,time:1.29073}, - {len:1024,time:2.47236}, - {len:2048,time:4.75451}, - {len:4096,time:9.21033}, - {len:8192,time:18.2181}, - {len:16384,time:36.7635}, - {len:32768,time:72.1087}, - {len:65536,time:145.095} + {len:32,time:0.126213}, + {len:64,time:0.233356}, + {len:128,time:0.406315}, + {len:256,time:0.7034}, + {len:512,time:1.32471}, + {len:1024,time:2.50247}, + {len:2048,time:4.79475}, + {len:4096,time:9.34878}, + {len:8192,time:18.3462}, + {len:16384,time:36.4792}, + {len:32768,time:72.2198}, + {len:65536,time:146.171} ]}, {name:'ModpB64Chromium', values:[ - {len:32,time:0.0530579}, - {len:64,time:0.0704899}, - {len:128,time:0.0797569}, - {len:256,time:0.118433}, - {len:512,time:0.183192}, - {len:1024,time:0.337503}, - {len:2048,time:0.616437}, - {len:4096,time:1.18641}, - {len:8192,time:2.35802}, - {len:16384,time:4.59707}, - {len:32768,time:9.48017}, - {len:65536,time:19.0851} + {len:32,time:0.0537099}, + {len:64,time:0.0665439}, + {len:128,time:0.0790999}, + {len:256,time:0.12144}, + {len:512,time:0.184739}, + {len:1024,time:0.334553}, + {len:2048,time:0.618162}, + {len:4096,time:1.22581}, + {len:8192,time:2.35817}, + {len:16384,time:4.64645}, + {len:32768,time:9.43574}, + {len:65536,time:19.0453} ]}, {name:'NibbleAndAHalf', values:[ - {len:32,time:0.0574409}, - {len:64,time:0.0727839}, - {len:128,time:0.0838579}, - {len:256,time:0.123197}, - {len:512,time:0.191939}, - {len:1024,time:0.344687}, - {len:2048,time:0.636395}, - {len:4096,time:1.23169}, - {len:8192,time:2.4419}, - {len:16384,time:4.74192}, - {len:32768,time:9.64702}, - {len:65536,time:19.7041} + {len:32,time:0.0554609}, + {len:64,time:0.0701989}, + {len:128,time:0.0835689}, + {len:256,time:0.128307}, + {len:512,time:0.194617}, + {len:1024,time:0.350504}, + {len:2048,time:0.640205}, + {len:4096,time:1.23483}, + {len:8192,time:2.42237}, + {len:16384,time:4.79764}, + {len:32768,time:9.60005}, + {len:65536,time:19.2421} ]}, {name:'Polfosol', values:[ - {len:32,time:0.0579699}, - {len:64,time:0.0859479}, - {len:128,time:0.105495}, - {len:256,time:0.168501}, - {len:512,time:0.277427}, - {len:1024,time:0.507046}, - {len:2048,time:0.958892}, - {len:4096,time:1.8868}, - {len:8192,time:3.73163}, - {len:16384,time:7.40856}, - {len:32768,time:14.9126}, - {len:65536,time:29.5612} + {len:32,time:0.0575809}, + {len:64,time:0.0776519}, + {len:128,time:0.0999059}, + {len:256,time:0.163786}, + {len:512,time:0.267416}, + {len:1024,time:0.516258}, + {len:2048,time:0.957711}, + {len:4096,time:1.86524}, + {len:8192,time:3.78172}, + {len:16384,time:7.40829}, + {len:32768,time:14.7886}, + {len:65536,time:29.6243} ]}, {name:'Polfosol_IMUtility', values:[ - {len:32,time:0.0547259}, - {len:64,time:0.0746859}, - {len:128,time:0.0889159}, - {len:256,time:0.138688}, - {len:512,time:0.218784}, - {len:1024,time:0.405563}, - {len:2048,time:0.75432}, - {len:4096,time:1.45933}, - {len:8192,time:2.88847}, - {len:16384,time:5.67576}, - {len:32768,time:11.5368}, - {len:65536,time:23.0654} + {len:32,time:0.0576069}, + {len:64,time:0.0742969}, + {len:128,time:0.0898229}, + {len:256,time:0.142522}, + {len:512,time:0.221749}, + {len:1024,time:0.402929}, + {len:2048,time:0.752739}, + {len:4096,time:1.45145}, + {len:8192,time:2.87545}, + {len:16384,time:5.6519}, + {len:32768,time:11.3778}, + {len:65536,time:23.2173} ]}, {name:'TomyKaria', values:[ - {len:32,time:0.0867079}, - {len:64,time:0.118443}, - {len:128,time:0.138951}, - {len:256,time:0.206255}, - {len:512,time:0.337416}, - {len:1024,time:0.611639}, - {len:2048,time:1.13312}, - {len:4096,time:2.13245}, - {len:8192,time:4.26559}, - {len:16384,time:8.59056}, - {len:32768,time:17.1311}, - {len:65536,time:34.8999} + {len:32,time:0.0836629}, + {len:64,time:0.112254}, + {len:128,time:0.140956}, + {len:256,time:0.211749}, + {len:512,time:0.330709}, + {len:1024,time:0.597026}, + {len:2048,time:1.12353}, + {len:4096,time:2.15767}, + {len:8192,time:4.33615}, + {len:16384,time:8.59028}, + {len:32768,time:17.432}, + {len:65536,time:34.8449} ]}, {name:'Turbob64', values:[ - {len:32,time:0.046988}, - {len:64,time:0.0543599}, - {len:128,time:0.0500609}, - {len:256,time:0.0616389}, - {len:512,time:0.0626989}, - {len:1024,time:0.0903109}, - {len:2048,time:0.123204}, - {len:4096,time:0.217075}, - {len:8192,time:0.403342}, - {len:16384,time:0.710362}, - {len:32768,time:1.47247}, - {len:65536,time:3.08673} + {len:32,time:0.047092}, + {len:64,time:0.0531409}, + {len:128,time:0.04992}, + {len:256,time:0.0593929}, + {len:512,time:0.0653699}, + {len:1024,time:0.0879739}, + {len:2048,time:0.123145}, + {len:4096,time:0.21471}, + {len:8192,time:0.39949}, + {len:16384,time:0.711682}, + {len:32768,time:1.48663}, + {len:65536,time:3.08228} ]}, {name:'User152949', values:[ - {len:32,time:1.66808}, - {len:64,time:2.94033}, - {len:128,time:5.3985}, - {len:256,time:10.3323}, - {len:512,time:20.0114}, - {len:1024,time:39.8335}, - {len:2048,time:79.1853}, - {len:4096,time:157.527}, - {len:8192,time:318.338}, - {len:16384,time:630.427}, - {len:32768,time:1256.8}, - {len:65536,time:2534.59} + {len:32,time:1.59833}, + {len:64,time:2.85947}, + {len:128,time:5.21264}, + {len:256,time:9.97859}, + {len:512,time:19.7282}, + {len:1024,time:38.274}, + {len:2048,time:75.5065}, + {len:4096,time:152.781}, + {len:8192,time:303.133}, + {len:16384,time:604.977}, + {len:32768,time:1217.88}, + {len:65536,time:2451.01} ]}, {name:'WikibooksOrgC', values:[ - {len:32,time:0.0622239}, - {len:64,time:0.0892279}, - {len:128,time:0.103447}, - {len:256,time:0.174216}, - {len:512,time:0.276135}, - {len:1024,time:0.520873}, - {len:2048,time:0.989825}, - {len:4096,time:1.91405}, - {len:8192,time:3.80478}, - {len:16384,time:7.44347}, - {len:32768,time:15.2899}, - {len:65536,time:31.0377} + {len:32,time:0.0607069}, + {len:64,time:0.0883739}, + {len:128,time:0.10522}, + {len:256,time:0.175007}, + {len:512,time:0.282311}, + {len:1024,time:0.534488}, + {len:2048,time:1.00055}, + {len:4096,time:1.98657}, + {len:8192,time:3.94265}, + {len:16384,time:7.70843}, + {len:32768,time:15.5981}, + {len:65536,time:31.3252} ]}, {name:'WikibooksOrgCpp', values:[ - {len:32,time:0.104505}, - {len:64,time:0.138293}, - {len:128,time:0.189359}, - {len:256,time:0.30312}, - {len:512,time:0.521337}, - {len:1024,time:0.972016}, - {len:2048,time:1.87591}, - {len:4096,time:3.67439}, - {len:8192,time:7.28094}, - {len:16384,time:14.3293}, - {len:32768,time:28.777}, - {len:65536,time:58.4239} + {len:32,time:0.102312}, + {len:64,time:0.136305}, + {len:128,time:0.1867}, + {len:256,time:0.303871}, + {len:512,time:0.521675}, + {len:1024,time:0.971285}, + {len:2048,time:1.86474}, + {len:4096,time:3.67895}, + {len:8192,time:7.30737}, + {len:16384,time:14.4605}, + {len:32768,time:28.9664}, + {len:65536,time:58.3749} ]}, {name:'base64aklomp', values:[ - {len:32,time:0.0606159}, - {len:64,time:0.0645239}, - {len:128,time:0.0645529}, - {len:256,time:0.0707299}, - {len:512,time:0.0791179}, - {len:1024,time:0.103786}, - {len:2048,time:0.146078}, - {len:4096,time:0.225688}, - {len:8192,time:0.413499}, - {len:16384,time:0.698479}, - {len:32768,time:1.8386}, - {len:65536,time:4.00509} + {len:32,time:0.0587069}, + {len:64,time:0.0663189}, + {len:128,time:0.0639739}, + {len:256,time:0.0713019}, + {len:512,time:0.0812629}, + {len:1024,time:0.10245}, + {len:2048,time:0.146743}, + {len:4096,time:0.226042}, + {len:8192,time:0.40785}, + {len:16384,time:0.698643}, + {len:32768,time:1.86126}, + {len:65536,time:3.80307} ]}, {name:'base64ppwrap', values:[ - {len:32,time:0.0844949}, - {len:64,time:0.124867}, - {len:128,time:0.186265}, - {len:256,time:0.31507}, - {len:512,time:0.582315}, - {len:1024,time:1.09341}, - {len:2048,time:2.12072}, - {len:4096,time:4.12268}, - {len:8192,time:8.21694}, - {len:16384,time:16.8264}, - {len:32768,time:32.7629}, - {len:65536,time:65.6457} + {len:32,time:0.0829159}, + {len:64,time:0.116887}, + {len:128,time:0.178266}, + {len:256,time:0.30873}, + {len:512,time:0.578548}, + {len:1024,time:1.07789}, + {len:2048,time:2.10067}, + {len:4096,time:4.15922}, + {len:8192,time:8.24637}, + {len:16384,time:16.4672}, + {len:32768,time:32.887}, + {len:65536,time:65.9632} ]}, {name:'base64tl', values:[ - {len:32,time:0.0524389}, - {len:64,time:0.0649239}, - {len:128,time:0.0806849}, - {len:256,time:0.118762}, - {len:512,time:0.184518}, - {len:1024,time:0.346265}, - {len:2048,time:0.625609}, - {len:4096,time:1.20254}, - {len:8192,time:2.39245}, - {len:16384,time:4.64646}, - {len:32768,time:9.28095}, - {len:65536,time:18.7407} + {len:32,time:0.0529929}, + {len:64,time:0.0650469}, + {len:128,time:0.0786329}, + {len:256,time:0.117393}, + {len:512,time:0.183417}, + {len:1024,time:0.334192}, + {len:2048,time:0.612064}, + {len:4096,time:1.18882}, + {len:8192,time:2.36173}, + {len:16384,time:4.65936}, + {len:32768,time:9.29176}, + {len:65536,time:18.6626} ]}, {name:'picobase64', values:[ - {len:32,time:0.0573139}, - {len:64,time:0.0711659}, - {len:128,time:0.0864089}, - {len:256,time:0.126641}, - {len:512,time:0.195547}, - {len:1024,time:0.353584}, - {len:2048,time:0.64528}, - {len:4096,time:1.27961}, - {len:8192,time:2.51202}, - {len:16384,time:4.87069}, - {len:32768,time:9.8457}, - {len:65536,time:19.7159} + {len:32,time:0.0566469}, + {len:64,time:0.0698119}, + {len:128,time:0.0837799}, + {len:256,time:0.126268}, + {len:512,time:0.194435}, + {len:1024,time:0.351818}, + {len:2048,time:0.641151}, + {len:4096,time:1.24417}, + {len:8192,time:2.46756}, + {len:16384,time:4.87216}, + {len:32768,time:10.0462}, + {len:65536,time:19.8496} ]}] diff --git a/src/libcurl/curl_base64.cpp b/src/libcurl/curl_base64.cpp index ac9506b..e1c7777 100644 --- a/src/libcurl/curl_base64.cpp +++ b/src/libcurl/curl_base64.cpp @@ -1,37 +1,48 @@ /*************************************************************************** -* _ _ ____ _ -* Project ___| | | | _ \| | -* / __| | | | |_) | | -* | (__| |_| | _ <| |___ -* \___|\___/|_| \_\_____| -* -* Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. -* -* This software is licensed as described in the file COPYING, which -* you should have received as part of this distribution. The terms -* are also available at https://curl.haxx.se/docs/copyright.html. -* -* You may opt to use, copy, modify, merge, publish, distribute and/or sell -* copies of the Software, and permit persons to whom the Software is -* furnished to do so, under the terms of the COPYING file. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -***************************************************************************/ - -/* Base64 encoding/decoding */ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * SPDX-License-Identifier: curl + * + ***************************************************************************/ + + /* Base64 encoding/decoding */ //#include "curl_setup.h" -//#include "urldata.h" /* for the Curl_easy definition */ + +#if !defined(CURL_DISABLE_HTTP_AUTH) || defined(USE_SSH) || \ + !defined(CURL_DISABLE_LDAP) || \ + !defined(CURL_DISABLE_SMTP) || \ + !defined(CURL_DISABLE_POP3) || \ + !defined(CURL_DISABLE_IMAP) || \ + !defined(CURL_DISABLE_DIGEST_AUTH) || \ + !defined(CURL_DISABLE_DOH) || defined(USE_SSL) || defined(BUILDING_CURL) +//#include "curl/curl.h" //#include "warnless.h" #include "curl_base64.h" -//#include "non-ascii.h" -/* The last 3 #include files should be in this order */ -//#include "curl_printf.h" -//#include "curl_memory.h" +/* The last 2 #include files should be in this order */ +#ifdef BUILDING_LIBCURL +#include "curl_memory.h" +#endif //#include "memdebug.h" + #include #define CURL_MASK_UCHAR 0xFF #define NULL nullptr @@ -42,263 +53,252 @@ using CURLcode = int; #include #include -static inline unsigned char curlx_ultouc(unsigned long ulnum) -{ - return (unsigned char)(ulnum & (unsigned long)CURL_MASK_UCHAR); -} - - /* ---- Base64 Encoding/Decoding Table --- */ -static const char base64[] = -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +/* Padding character string starts at offset 64. */ +static const char base64encdec[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; -/* The Base 64 encoding with an URL and filename safe alphabet, RFC 4648 -section 5 */ +/* The Base 64 encoding with a URL and filename safe alphabet, RFC 4648 + section 5 */ static const char base64url[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; -static size_t decodeQuantum(unsigned char *dest, const char *src) -{ - size_t padding = 0; - const char *s, *p; - unsigned long i, x = 0; - - for (i = 0, s = src; i < 4; i++, s++) { - unsigned long v = 0; - - if (*s == '=') { - x = (x << 6); - padding++; - } - else { - p = base64; - - while (*p && (*p != *s)) { - v++; - p++; - } - - if (*p == *s) - x = (x << 6) + v; - else - return 0; - } - } - - if (padding < 1) - dest[2] = curlx_ultouc(x & 0xFFUL); - - x >>= 8; - if (padding < 2) - dest[1] = curlx_ultouc(x & 0xFFUL); - - x >>= 8; - dest[0] = curlx_ultouc(x & 0xFFUL); - - return 3 - padding; -} - +static const unsigned char decodetable[] = +{ 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, + 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51 }; /* -* Curl_base64_decode() -* -* Given a base64 NUL-terminated string at src, decode it and return a -* pointer in *outptr to a newly allocated memory area holding decoded -* data. Size of decoded data is returned in variable pointed by outlen. -* -* Returns CURLE_OK on success, otherwise specific error code. Function -* output shall not be considered valid unless CURLE_OK is returned. -* -* When decoded data length is 0, returns NULL in *outptr. -* -* @unittest: 1302 -*/ -CURLcode Curl_base64_decode(const char *src, std::string *outStr) + * Curl_base64_decode() + * + * Given a base64 NUL-terminated string at src, decode it and return a + * pointer in *outptr to a newly allocated memory area holding decoded + * data. Size of decoded data is returned in variable pointed by outlen. + * + * Returns CURLE_OK on success, otherwise specific error code. Function + * output shall not be considered valid unless CURLE_OK is returned. + * + * When decoded data length is 0, returns NULL in *outptr. + * + * @unittest: 1302 + */ +CURLcode Curl_base64_decode(const char* src, + unsigned char** outptr, size_t* outlen) { - size_t srclen = 0; - size_t length = 0; - size_t padding = 0; - size_t i; - size_t numQuantums; - size_t rawlen = 0; - unsigned char *pos; - unsigned char *newstr; - - unsigned char *outptr = NULL; - int outlen = 0; - srclen = strlen(src); - - /* Check the length of the input string is valid */ - if (!srclen || srclen % 4) - return CURLE_BAD_CONTENT_ENCODING; - - /* Find the position of any = padding characters */ - while ((src[length] != '=') && src[length]) - length++; - - /* A maximum of two = padding characters is allowed */ - if (src[length] == '=') { - padding++; - if (src[length + 1] == '=') - padding++; - } - - /* Check the = padding characters weren't part way through the input */ - if (length + padding != srclen) - return CURLE_BAD_CONTENT_ENCODING; - - /* Calculate the number of quantums */ - numQuantums = srclen / 4; - - /* Calculate the size of the decoded string */ - rawlen = (numQuantums * 3) - padding; - - /* Allocate our buffer including room for a zero terminator */ - outStr->resize(rawlen); - newstr = (unsigned char*)&(*outStr)[0]; - if (!newstr) - return CURLE_OUT_OF_MEMORY; - - pos = newstr; - - /* Decode the quantums */ - for (i = 0; i < numQuantums; i++) { - size_t result = decodeQuantum(pos, src); - if (!result) { - free(newstr); - - return CURLE_BAD_CONTENT_ENCODING; - } - - pos += result; - src += 4; - } - - return CURLE_OK; + size_t srclen = 0; + size_t padding = 0; + size_t i; + size_t numQuantums; + size_t fullQuantums; + size_t rawlen = 0; + unsigned char* pos; + unsigned char* newstr; + unsigned char lookup[256]; + + *outptr = NULL; + *outlen = 0; + srclen = strlen(src); + + /* Check the length of the input string is valid */ + if (!srclen || srclen % 4) + return CURLE_BAD_CONTENT_ENCODING; + + /* srclen is at least 4 here */ + while (src[srclen - 1 - padding] == '=') { + /* count padding characters */ + padding++; + /* A maximum of two = padding characters is allowed */ + if (padding > 2) + return CURLE_BAD_CONTENT_ENCODING; + } + + /* Calculate the number of quantums */ + numQuantums = srclen / 4; + fullQuantums = numQuantums - (padding ? 1 : 0); + + /* Calculate the size of the decoded string */ + rawlen = (numQuantums * 3) - padding; + + /* Allocate our buffer including room for a null-terminator */ + newstr = (unsigned char*)malloc(rawlen + 1); + if (!newstr) + return CURLE_OUT_OF_MEMORY; + + pos = newstr; + + memset(lookup, 0xff, sizeof(lookup)); + memcpy(&lookup['+'], decodetable, sizeof(decodetable)); + /* replaces + { + unsigned char c; + const unsigned char *p = (const unsigned char *)base64encdec; + for(c = 0; *p; c++, p++) + lookup[*p] = c; + } + */ + + /* Decode the complete quantums first */ + for (i = 0; i < fullQuantums; i++) { + unsigned char val; + unsigned int x = 0; + int j; + + for (j = 0; j < 4; j++) { + val = lookup[(unsigned char)*src++]; + if (val == 0xff) /* bad symbol */ + goto bad; + x = (x << 6) | val; + } + pos[2] = x & 0xff; + pos[1] = (x >> 8) & 0xff; + pos[0] = (x >> 16) & 0xff; + pos += 3; + } + if (padding) { + /* this means either 8 or 16 bits output */ + unsigned char val; + unsigned int x = 0; + int j; + size_t padc = 0; + for (j = 0; j < 4; j++) { + if (*src == '=') { + x <<= 6; + src++; + if (++padc > padding) + /* this is a badly placed '=' symbol! */ + goto bad; + } + else { + val = lookup[(unsigned char)*src++]; + if (val == 0xff) /* bad symbol */ + goto bad; + x = (x << 6) | val; + } + } + if (padding == 1) + pos[1] = (x >> 8) & 0xff; + pos[0] = (x >> 16) & 0xff; + pos += 3 - padding; + } + + /* Zero terminate */ + *pos = '\0'; + + /* Return the decoded data */ + *outptr = newstr; + *outlen = rawlen; + + return CURLE_OK; +bad: + free(newstr); + return CURLE_BAD_CONTENT_ENCODING; } -static CURLcode base64_encode(const char *table64, - const char *inputbuff, size_t insize, std::string *outptr) - { - CURLcode result; - unsigned char ibuf[3]; - unsigned char obuf[4]; - int i; - int inputparts; - char *output; - std::string base64data; +static CURLcode base64_encode(const char* table64, + const char* inputbuff, size_t insize, + char** outptr, size_t* outlen) +{ + char* output; + char* base64data; + const unsigned char* in = (unsigned char*)inputbuff; + const char* padstr = &table64[64]; /* Point to padding string. */ - const char *indata = inputbuff; + *outptr = NULL; + *outlen = 0; - if (!insize) - insize = strlen(indata); + if (!insize) + insize = strlen(inputbuff); #if SIZEOF_SIZE_T == 4 - if (insize > UINT_MAX / 4) - return CURLE_OUT_OF_MEMORY; + if (insize > UINT_MAX / 4) + return CURLE_OUT_OF_MEMORY; #endif - base64data.resize(insize * 4 / 3 + 4); - output = &base64data[0]; - if (!output) - return CURLE_OUT_OF_MEMORY; - - while (insize > 0) { - for (i = inputparts = 0; i < 3; i++) { - if (insize > 0) { - inputparts++; - ibuf[i] = (unsigned char)*indata; - indata++; - insize--; - } - else - ibuf[i] = 0; - } - - obuf[0] = (unsigned char)((ibuf[0] & 0xFC) >> 2); - obuf[1] = (unsigned char)(((ibuf[0] & 0x03) << 4) | \ - ((ibuf[1] & 0xF0) >> 4)); - obuf[2] = (unsigned char)(((ibuf[1] & 0x0F) << 2) | \ - ((ibuf[2] & 0xC0) >> 6)); - obuf[3] = (unsigned char)(ibuf[2] & 0x3F); - - switch (inputparts) { - case 1: /* only one byte read */ - snprintf(output, 5, "%c%c==", - table64[obuf[0]], - table64[obuf[1]]); - break; - - case 2: /* two bytes read */ - snprintf(output, 5, "%c%c%c=", - table64[obuf[0]], - table64[obuf[1]], - table64[obuf[2]]); - break; - - default: - snprintf(output, 5, "%c%c%c%c", - table64[obuf[0]], - table64[obuf[1]], - table64[obuf[2]], - table64[obuf[3]]); - break; - } - output += 4; - } - - /* Zero terminate */ - *output = '\0'; - base64data.resize(output - &base64data[0]); - - /* Return the pointer to the new data (allocated memory) */ - *outptr = std::move(base64data); - - return CURLE_OK; + base64data = output = (char*)malloc((insize + 2) / 3 * 4 + 1); + if (!output) + return CURLE_OUT_OF_MEMORY; + + while (insize >= 3) { + *output++ = table64[in[0] >> 2]; + *output++ = table64[((in[0] & 0x03) << 4) | (in[1] >> 4)]; + *output++ = table64[((in[1] & 0x0F) << 2) | ((in[2] & 0xC0) >> 6)]; + *output++ = table64[in[2] & 0x3F]; + insize -= 3; + in += 3; + } + if (insize) { + /* this is only one or two bytes now */ + *output++ = table64[in[0] >> 2]; + if (insize == 1) { + *output++ = table64[((in[0] & 0x03) << 4)]; + if (*padstr) { + *output++ = *padstr; + *output++ = *padstr; + } + } + else { + /* insize == 2 */ + *output++ = table64[((in[0] & 0x03) << 4) | ((in[1] & 0xF0) >> 4)]; + *output++ = table64[((in[1] & 0x0F) << 2)]; + if (*padstr) + *output++ = *padstr; + } + } + + /* Zero terminate */ + *output = '\0'; + + /* Return the pointer to the new data (allocated memory) */ + *outptr = base64data; + + /* Return the length of the new data */ + *outlen = (size_t)(output - base64data); + + return CURLE_OK; } /* -* Curl_base64_encode() -* -* Given a pointer to an input buffer and an input size, encode it and -* return a pointer in *outptr to a newly allocated memory area holding -* encoded data. Size of encoded data is returned in variable pointed by -* outlen. -* -* Input length of 0 indicates input buffer holds a NUL-terminated string. -* -* Returns CURLE_OK on success, otherwise specific error code. Function -* output shall not be considered valid unless CURLE_OK is returned. -* -* When encoded data length is 0, returns NULL in *outptr. -* -* @unittest: 1302 -*/ -CURLcode Curl_base64_encode(const char *inputbuff, size_t insize, - std::string *outptr) + * Curl_base64_encode() + * + * Given a pointer to an input buffer and an input size, encode it and + * return a pointer in *outptr to a newly allocated memory area holding + * encoded data. Size of encoded data is returned in variable pointed by + * outlen. + * + * Input length of 0 indicates input buffer holds a NUL-terminated string. + * + * Returns CURLE_OK on success, otherwise specific error code. Function + * output shall not be considered valid unless CURLE_OK is returned. + * + * @unittest: 1302 + */ +CURLcode Curl_base64_encode(const char* inputbuff, size_t insize, + char** outptr, size_t* outlen) { - return base64_encode(base64, inputbuff, insize, outptr); + return base64_encode(base64encdec, inputbuff, insize, outptr, outlen); } /* -* Curl_base64url_encode() -* -* Given a pointer to an input buffer and an input size, encode it and -* return a pointer in *outptr to a newly allocated memory area holding -* encoded data. Size of encoded data is returned in variable pointed by -* outlen. -* -* Input length of 0 indicates input buffer holds a NUL-terminated string. -* -* Returns CURLE_OK on success, otherwise specific error code. Function -* output shall not be considered valid unless CURLE_OK is returned. -* -* When encoded data length is 0, returns NULL in *outptr. -* -* @unittest: 1302 -*/ -CURLcode Curl_base64url_encode(const char *inputbuff, size_t insize, - std::string *outptr) + * Curl_base64url_encode() + * + * Given a pointer to an input buffer and an input size, encode it and + * return a pointer in *outptr to a newly allocated memory area holding + * encoded data. Size of encoded data is returned in variable pointed by + * outlen. + * + * Input length of 0 indicates input buffer holds a NUL-terminated string. + * + * Returns CURLE_OK on success, otherwise specific error code. Function + * output shall not be considered valid unless CURLE_OK is returned. + * + * @unittest: 1302 + */ +CURLcode Curl_base64url_encode(const char* inputbuff, size_t insize, + char** outptr, size_t* outlen) { - return base64_encode(base64url, inputbuff, insize, outptr); -} \ No newline at end of file + return base64_encode(base64url, inputbuff, insize, outptr, outlen); +} + +#endif /* no users so disabled */ diff --git a/src/libcurl/curl_base64.h b/src/libcurl/curl_base64.h index b14c01d..9c24da9 100644 --- a/src/libcurl/curl_base64.h +++ b/src/libcurl/curl_base64.h @@ -23,11 +23,12 @@ ***************************************************************************/ #include -int Curl_base64_encode(const char *inputbuff, size_t insize, - std::string *outptr); -int Curl_base64url_encode(const char *inputbuff, size_t insize, - std::string *outptr); +int Curl_base64_encode(const char* inputbuff, size_t insize, + char** outptr, size_t* outlen); +int Curl_base64url_encode(const char* inputbuff, size_t insize, + char** outptr, size_t* outlen); -int Curl_base64_decode(const char *src, std::string *outStr); +int Curl_base64_decode(const char* src, + unsigned char** outptr, size_t* outlen); #endif /* HEADER_CURL_BASE64_H */ \ No newline at end of file diff --git a/src/libcurl/test_libcurl.cpp b/src/libcurl/test_libcurl.cpp index 785fffe..bbec6aa 100644 --- a/src/libcurl/test_libcurl.cpp +++ b/src/libcurl/test_libcurl.cpp @@ -7,15 +7,21 @@ struct LibCurl { std::string encode(const std::string &bytes) { - std::string str; - Curl_base64_encode(bytes.data(), bytes.length(), &str); + char* out; + size_t outlen; + Curl_base64_encode(bytes.data(), bytes.length(), &out, &outlen); + std::string str(out, outlen); + free(out); return str; } std::string decode(const std::string &base64) { - std::string str; - Curl_base64_decode(base64.data(), &str); + unsigned char* out; + size_t outlen; + Curl_base64_decode(base64.data(), &out, &outlen); + std::string str((char*)out, outlen); + free(out); return str; } };