deskhop/webconfig/templates/packer.j2
Hrvoje Cavrak 1415c1d31a DeskHop v0.61 - Promoted RC to Stable
- Single unified firmware binary
- Improved support for NKRO keyboards
- Report mode default for keyboard port
- Improved consumer control parser for variable
  data types (media keys should be better supported)
- System control forwarding
- Improved HID parser
- Web UI to configure instead of keyboard shortcuts
- Firmware upgrade while the device remains functional
- Only one end will need upgrade, the other will get it automatically
- No need to recompile to set most settings
- Improved UART routines to use DMA, more reliable link
- Fixed a bunch of bugs and issues
2024-07-30 14:19:19 +02:00

2 lines
4.2 KiB
Django/Jinja

{% raw %}<!DOCTYPE html><html lang="en"><head><script>var TINF_OK=0;var TINF_DATA_ERROR=-3;function Tree(){this.table=new Uint16Array(16);this.trans=new Uint16Array(288)}function Data(b,a){this.source=b;this.sourceIndex=0;this.tag=0;this.bitcount=0;this.dest=a;this.destLen=0;this.ltree=new Tree();this.dtree=new Tree()}var sltree=new Tree();var sdtree=new Tree();var length_bits=new Uint8Array(30);var length_base=new Uint16Array(30);var dist_bits=new Uint8Array(30);var dist_base=new Uint16Array(30);var clcidx=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);var code_tree=new Tree();var lengths=new Uint8Array(288+32);function tinf_build_bits_base(d,c,f,e){var a,b;for(a=0;a<f;++a){d[a]=0}for(a=0;a<30-f;++a){d[a+f]=a/f|0}for(b=e,a=0;a<30;++a){c[a]=b;b+=1<<d[a]}}function tinf_build_fixed_trees(a,c){var b;for(b=0;b<7;++b){a.table[b]=0}a.table[7]=24;a.table[8]=152;a.table[9]=112;for(b=0;b<24;++b){a.trans[b]=256+b}for(b=0;b<144;++b){a.trans[24+b]=b}for(b=0;b<8;++b){a.trans[24+144+b]=280+b}for(b=0;b<112;++b){a.trans[24+144+8+b]=144+b}for(b=0;b<5;++b){c.table[b]=0}c.table[5]=32;for(b=0;b<32;++b){c.trans[b]=b}}var offs=new Uint16Array(16);function tinf_build_tree(c,f,e,a){var b,d;for(b=0;b<16;++b){c.table[b]=0}for(b=0;b<a;++b){c.table[f[e+b]]++}c.table[0]=0;for(d=0,b=0;b<16;++b){offs[b]=d;d+=c.table[b]}for(b=0;b<a;++b){if(f[e+b]){c.trans[offs[f[e+b]]++]=b}}}function tinf_getbit(b){if(!b.bitcount--){b.tag=b.source[b.sourceIndex++];b.bitcount=7}var a=b.tag&1;b.tag>>>=1;return a}function tinf_read_bits(e,a,b){if(!a){return b}while(e.bitcount<24){e.tag|=e.source[e.sourceIndex++]<<e.bitcount;e.bitcount+=8}var c=e.tag&(65535>>>(16-a));e.tag>>>=a;e.bitcount-=a;return c+b}function tinf_decode_symbol(g,c){while(g.bitcount<24){g.tag|=g.source[g.sourceIndex++]<<g.bitcount;g.bitcount+=8}var e=0,f=0,b=0;var a=g.tag;do{f=2*f+(a&1);a>>>=1;++b;e+=c.table[b];f-=c.table[b]}while(f>=0);g.tag=a;g.bitcount-=b;return c.trans[e+f]}function tinf_decode_trees(j,f,c){var n,k,l;var g,h,b;n=tinf_read_bits(j,5,257);k=tinf_read_bits(j,5,1);l=tinf_read_bits(j,4,4);for(g=0;g<19;++g){lengths[g]=0}for(g=0;g<l;++g){var m=tinf_read_bits(j,3,0);lengths[clcidx[g]]=m}tinf_build_tree(code_tree,lengths,0,19);for(h=0;h<n+k;){var a=tinf_decode_symbol(j,code_tree);switch(a){case 16:var e=lengths[h-1];for(b=tinf_read_bits(j,2,3);b;--b){lengths[h++]=e}break;case 17:for(b=tinf_read_bits(j,3,3);b;--b){lengths[h++]=0}break;case 18:for(b=tinf_read_bits(j,7,11);b;--b){lengths[h++]=0}break;default:lengths[h++]=a;break}}tinf_build_tree(f,lengths,0,n);tinf_build_tree(c,lengths,n,k)}function tinf_inflate_block_data(j,a,f){while(1){var b=tinf_decode_symbol(j,a);if(b===256){return TINF_OK}if(b<256){j.dest[j.destLen++]=b}else{var e,h,g;var c;b-=257;e=tinf_read_bits(j,length_bits[b],length_base[b]);h=tinf_decode_symbol(j,f);g=j.destLen-tinf_read_bits(j,dist_bits[h],dist_base[h]);for(c=g;c<g+e;++c){j.dest[j.destLen++]=j.dest[c]}}}}function tinf_inflate_uncompressed_block(e){var b,c;var a;while(e.bitcount>8){e.sourceIndex--;e.bitcount-=8}b=e.source[e.sourceIndex+1];b=256*b+e.source[e.sourceIndex];c=e.source[e.sourceIndex+3];c=256*c+e.source[e.sourceIndex+2];if(b!==(~c&65535)){return TINF_DATA_ERROR}e.sourceIndex+=4;for(a=b;a;--a){e.dest[e.destLen++]=e.source[e.sourceIndex++]}e.bitcount=0;return TINF_OK}function tinf_uncompress(e,b){var f=new Data(e,b);var a,g,c;do{a=tinf_getbit(f);g=tinf_read_bits(f,2,0);switch(g){case 0:c=tinf_inflate_uncompressed_block(f);break;case 1:c=tinf_inflate_block_data(f,sltree,sdtree);break;case 2:tinf_decode_trees(f,f.ltree,f.dtree);c=tinf_inflate_block_data(f,f.ltree,f.dtree);break;default:c=TINF_DATA_ERROR}if(c!==TINF_OK){throw new Error("Data error")}}while(!a);if(f.destLen<f.dest.length){if(typeof f.dest.slice==="function"){return f.dest.slice(0,f.destLen)}else{return f.dest.subarray(0,f.destLen)}}return f.dest}tinf_build_fixed_trees(sltree,sdtree);tinf_build_bits_base(length_bits,length_base,4,3);tinf_build_bits_base(dist_bits,dist_base,2,1);length_bits[28]=0;length_base[28]=258;var compressedData = Uint8Array.from(atob('{% endraw %}{{payload}}{% raw %}'), c => c.charCodeAt(0));var decData = new Uint8Array(100000); tinf_uncompress(compressedData, decData);document.open();document.write(new TextDecoder("utf-8").decode(decData));document.close();</script></head><body></body></html>{% endraw %}