@thi.ng/binary
Advanced tools
Comparing version 2.0.16 to 2.0.17
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.0.17](https://github.com/thi-ng/umbrella/compare/@thi.ng/binary@2.0.16...@thi.ng/binary@2.0.17) (2020-11-24) | ||
**Note:** Version bump only for package @thi.ng/binary | ||
## [2.0.16](https://github.com/thi-ng/umbrella/compare/@thi.ng/binary@2.0.15...@thi.ng/binary@2.0.16) (2020-09-22) | ||
@@ -8,0 +16,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(((t="undefined"!=typeof globalThis?globalThis:t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.binary={}))}(this,(function(t){"use strict";const i=new Float64Array(1),e=new Float32Array(i.buffer),o=new Int32Array(i.buffer),n=new Uint32Array(i.buffer),a=(i[0]=2,1073741824===n[1]),r=t=>(e[0]=t,o[0]),s=t=>(e[0]=t,n[0]),l=t=>(i[0]=t,a?[n[1],n[0]]:[n[0],n[1]]),b=t=>t<-1?-1:t>1?1:t,f=(t,i=!1)=>{const e=255&t,o=t>>8&255,n=t>>16&255,a=t>>24&255;return i?[e,o,n,a]:[a,n,o,e]},u=(t,i,e=!1)=>e?f(i,e).concat(f(t,e)):f(t,e).concat(f(i,e)),c=new Array(33).fill(0).map((t,i)=>Math.pow(2,i)-1),M=t=>16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24,p=(t,i)=>(~c[t]&c[i])>>>0,d=(t,i)=>(i&c[t])>>>0,y=(t,i)=>t>>>(3-i<<3)&255,h=(t,i)=>t>>>(7-i<<2)&15,m=(t,i,e)=>~e&t|e&i,w=t=>(t>>>24|t>>8&65280|(65280&t)<<8|t<<24)>>>0,A=w;t.IS_LE=a,t.MASKS=c,t.align=(t,i)=>t+--i&~i,t.bitAnd=(t,i)=>t&i,t.bitAndM=(t,i,e)=>d(t,i&e),t.bitAoi21=(t,i,e)=>~(t|i&e),t.bitAoi21M=(t,i,e,o)=>d(t,~(i|e&o)),t.bitAoi22=(t,i,e,o)=>~(t&i|e&o),t.bitAoi22M=(t,i,e,o,n)=>d(t,~(i&e|o&n)),t.bitClear=(t,i)=>(t&~(1<<i))>>>0,t.bitClearWindow=(t,i,e)=>t&~p(i,e),t.bitDemux=(t,i,e)=>[(t&~e)>>>0,(i&e)>>>0],t.bitDemuxM=(t,i,e,o)=>[d(t,i&~o),d(t,e&o)],t.bitFlip=(t,i)=>(t^1<<i)>>>0,t.bitImply=(t,i)=>~t|i,t.bitImplyM=(t,i,e)=>d(t,~i|e),t.bitMux=(t,i,e)=>(t&~e|i&e)>>>0,t.bitMuxM=(t,i,e,o)=>d(t,i&~o|e&o),t.bitNand=(t,i)=>~(t&i),t.bitNandM=(t,i,e)=>d(t,~(i&e)),t.bitNor=(t,i)=>~(t|i),t.bitNorM=(t,i,e)=>d(t,~(i|e)),t.bitNot=t=>~t,t.bitNotM=(t,i)=>d(t,~i),t.bitOai21=(t,i,e)=>~(t&(i|e)),t.bitOai21M=(t,i,e,o)=>d(t,~(i&(e|o))),t.bitOai22=(t,i,e,o)=>~((t|i)&(e|o)),t.bitOai22M=(t,i,e,o,n)=>d(t,~((i|e)&(o|n))),t.bitOr=(t,i)=>t|i,t.bitOrM=(t,i,e)=>d(t,i|e),t.bitSet=(t,i)=>(t|1<<i)>>>0,t.bitSetWindow=(t,i,e,o)=>{const n=p(e,o);return t&~n|i<<(1<<e)&n},t.bitSize=t=>t>1?Math.ceil(Math.log2(t)):0,t.bitXnor=(t,i)=>~(t^i),t.bitXnorM=(t,i,e)=>d(t,~(i^e)),t.bitXor=(t,i)=>t^i,t.bitXorM=(t,i,e)=>d(t,i^e),t.bytes16=(t,i=!1)=>{const e=255&t,o=t>>8&255;return i?[e,o]:[o,e]},t.bytes24=(t,i=!1)=>{const e=255&t,o=t>>8&255,n=t>>16&255;return i?[e,o,n]:[n,o,e]},t.bytes32=f,t.bytes64=u,t.bytesF32=(t,i=!1)=>f(s(t),i),t.bytesF64=(t,i=!1)=>u(...l(t),i),t.ceilPow2=t=>(t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1),t.clz32=t=>0!==t?31-(Math.log(t>>>0)/Math.LN2|0):32,t.ctz32=t=>{let i=32;return(t&=-t)&&i--,65535&t&&(i-=16),16711935&t&&(i-=8),252645135&t&&(i-=4),858993459&t&&(i-=2),1431655765&t&&(i-=1),i},t.decodeGray32=t=>(t^=t>>>16,t^=t>>>8,t^=t>>>4,t^=t>>>2,(t^=t>>>1)>>>0),t.defMask=p,t.encodeGray32=t=>(t^t>>>1)>>>0,t.f32u16=t=>32767*b(t)&65535,t.f32u24=t=>8388607*b(t)&16777215,t.f32u32=t=>2147483647*b(t)>>>0,t.f32u8=t=>127*b(t)&255,t.flip16=t=>m(t<<16,t>>>16,65535),t.flip8=w,t.flipBytes=A,t.floatToIntBits=r,t.floatToIntBits64=t=>(i[0]=t,a?[o[1],o[0]]:[o[0],o[1]]),t.floatToSortableInt=t=>{-0===t&&(t=0);const i=r(t);return t<0?~i|1<<31:i},t.floatToUintBits=s,t.floatToUintBits64=l,t.floorPow2=t=>(t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)),t.hammingDist=(t,i)=>M(t^i),t.intBitsToFloat=t=>(o[0]=t,e[0]),t.intBitsToFloat64=(t,e)=>(a?(o[1]=t,o[0]=e):(o[0]=t,o[1]=e),i[0]),t.isAligned=(t,i)=>!(t&i-1),t.isPow2=t=>!(!t||t&t-1),t.lane16=(t,i)=>t>>>(1-i<<4)&65535,t.lane2=(t,i)=>t>>>(15-i<<1)&3,t.lane4=h,t.lane8=y,t.maskH=(t,i)=>(i&~c[t])>>>0,t.maskL=d,t.mux=m,t.popCount=M,t.rotateLeft=(t,i)=>(t<<i|t>>>32-i)>>>0,t.rotateRight=(t,i)=>(t>>>i|t<<32-i)>>>0,t.same4=t=>(t>>4&15)==(15&t),t.same8=t=>(t>>8&255)==(255&t),t.setLane16=(t,i,e)=>e?m(t,i,65535):m(t,i<<16,4294901760),t.setLane2=(t,i,e)=>{const o=15-e<<1;return(~(3<<o)&t|(3&i)<<o)>>>0},t.setLane4=(t,i,e)=>{const o=7-e<<2;return(~(15<<o)&t|(15&i)<<o)>>>0},t.setLane8=(t,i,e)=>{const o=3-e<<3;return(~(255<<o)&t|(255&i)<<o)>>>0},t.splat16_32=t=>((t&=65535)<<16|t)>>>0,t.splat4_24=t=>1118481*(15&t),t.splat4_32=t=>286331153*(15&t)>>>0,t.splat8_24=t=>65793*(255&t),t.splat8_32=t=>16843009*(255&t)>>>0,t.swizzle4=(t,i,e,o,n,a,r,s,l)=>(h(t,i)<<28|h(t,e)<<24|h(t,o)<<20|h(t,n)<<16|h(t,a)<<12|h(t,r)<<8|h(t,s)<<4|h(t,l))>>>0,t.swizzle8=(t,i,e,o,n)=>(y(t,i)<<24|y(t,e)<<16|y(t,o)<<8|y(t,n))>>>0,t.u16f32=t=>((t&=65535)|4294901760*(t>>15))/32767,t.u24f32=t=>((t&=16777215)|4278190080*(t>>23))/8388607,t.u32f32=t=>(0|t)/2147483647,t.u8f32=t=>((t&=255)|4294967040*(t>>7))/127,t.uintBitsToFloat=t=>(n[0]=t,e[0]),t.uintBitsToFloat64=(t,e)=>(a?(n[1]=t,n[0]=e):(n[0]=t,n[1]=e),i[0]),Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(((t="undefined"!=typeof globalThis?globalThis:t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.binary={}))}(this,(function(t){"use strict";const i=new Float64Array(1),e=new Float32Array(i.buffer),o=new Int32Array(i.buffer),n=new Uint32Array(i.buffer),a=(i[0]=2,1073741824===n[1]),r=t=>(e[0]=t,o[0]),s=t=>(e[0]=t,n[0]),l=t=>(i[0]=t,a?[n[1],n[0]]:[n[0],n[1]]),b=t=>t<-1?-1:t>1?1:t,f=(t,i=!1)=>{const e=255&t,o=t>>8&255,n=t>>16&255,a=t>>24&255;return i?[e,o,n,a]:[a,n,o,e]},u=(t,i,e=!1)=>e?f(i,e).concat(f(t,e)):f(t,e).concat(f(i,e)),c=new Array(33).fill(0).map(((t,i)=>Math.pow(2,i)-1)),M=t=>16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24,p=(t,i)=>(~c[t]&c[i])>>>0,d=(t,i)=>(i&c[t])>>>0,y=(t,i)=>t>>>(3-i<<3)&255,h=(t,i)=>t>>>(7-i<<2)&15,m=(t,i,e)=>~e&t|e&i,w=t=>(t>>>24|t>>8&65280|(65280&t)<<8|t<<24)>>>0,A=w;t.IS_LE=a,t.MASKS=c,t.align=(t,i)=>t+--i&~i,t.bitAnd=(t,i)=>t&i,t.bitAndM=(t,i,e)=>d(t,i&e),t.bitAoi21=(t,i,e)=>~(t|i&e),t.bitAoi21M=(t,i,e,o)=>d(t,~(i|e&o)),t.bitAoi22=(t,i,e,o)=>~(t&i|e&o),t.bitAoi22M=(t,i,e,o,n)=>d(t,~(i&e|o&n)),t.bitClear=(t,i)=>(t&~(1<<i))>>>0,t.bitClearWindow=(t,i,e)=>t&~p(i,e),t.bitDemux=(t,i,e)=>[(t&~e)>>>0,(i&e)>>>0],t.bitDemuxM=(t,i,e,o)=>[d(t,i&~o),d(t,e&o)],t.bitFlip=(t,i)=>(t^1<<i)>>>0,t.bitImply=(t,i)=>~t|i,t.bitImplyM=(t,i,e)=>d(t,~i|e),t.bitMux=(t,i,e)=>(t&~e|i&e)>>>0,t.bitMuxM=(t,i,e,o)=>d(t,i&~o|e&o),t.bitNand=(t,i)=>~(t&i),t.bitNandM=(t,i,e)=>d(t,~(i&e)),t.bitNor=(t,i)=>~(t|i),t.bitNorM=(t,i,e)=>d(t,~(i|e)),t.bitNot=t=>~t,t.bitNotM=(t,i)=>d(t,~i),t.bitOai21=(t,i,e)=>~(t&(i|e)),t.bitOai21M=(t,i,e,o)=>d(t,~(i&(e|o))),t.bitOai22=(t,i,e,o)=>~((t|i)&(e|o)),t.bitOai22M=(t,i,e,o,n)=>d(t,~((i|e)&(o|n))),t.bitOr=(t,i)=>t|i,t.bitOrM=(t,i,e)=>d(t,i|e),t.bitSet=(t,i)=>(t|1<<i)>>>0,t.bitSetWindow=(t,i,e,o)=>{const n=p(e,o);return t&~n|i<<(1<<e)&n},t.bitSize=t=>t>1?Math.ceil(Math.log2(t)):0,t.bitXnor=(t,i)=>~(t^i),t.bitXnorM=(t,i,e)=>d(t,~(i^e)),t.bitXor=(t,i)=>t^i,t.bitXorM=(t,i,e)=>d(t,i^e),t.bytes16=(t,i=!1)=>{const e=255&t,o=t>>8&255;return i?[e,o]:[o,e]},t.bytes24=(t,i=!1)=>{const e=255&t,o=t>>8&255,n=t>>16&255;return i?[e,o,n]:[n,o,e]},t.bytes32=f,t.bytes64=u,t.bytesF32=(t,i=!1)=>f(s(t),i),t.bytesF64=(t,i=!1)=>u(...l(t),i),t.ceilPow2=t=>(t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1),t.clz32=t=>0!==t?31-(Math.log(t>>>0)/Math.LN2|0):32,t.ctz32=t=>{let i=32;return(t&=-t)&&i--,65535&t&&(i-=16),16711935&t&&(i-=8),252645135&t&&(i-=4),858993459&t&&(i-=2),1431655765&t&&(i-=1),i},t.decodeGray32=t=>(t^=t>>>16,t^=t>>>8,t^=t>>>4,t^=t>>>2,(t^=t>>>1)>>>0),t.defMask=p,t.encodeGray32=t=>(t^t>>>1)>>>0,t.f32u16=t=>32767*b(t)&65535,t.f32u24=t=>8388607*b(t)&16777215,t.f32u32=t=>2147483647*b(t)>>>0,t.f32u8=t=>127*b(t)&255,t.flip16=t=>m(t<<16,t>>>16,65535),t.flip8=w,t.flipBytes=A,t.floatToIntBits=r,t.floatToIntBits64=t=>(i[0]=t,a?[o[1],o[0]]:[o[0],o[1]]),t.floatToSortableInt=t=>{-0===t&&(t=0);const i=r(t);return t<0?~i|1<<31:i},t.floatToUintBits=s,t.floatToUintBits64=l,t.floorPow2=t=>(t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)),t.hammingDist=(t,i)=>M(t^i),t.intBitsToFloat=t=>(o[0]=t,e[0]),t.intBitsToFloat64=(t,e)=>(a?(o[1]=t,o[0]=e):(o[0]=t,o[1]=e),i[0]),t.isAligned=(t,i)=>!(t&i-1),t.isPow2=t=>!(!t||t&t-1),t.lane16=(t,i)=>t>>>(1-i<<4)&65535,t.lane2=(t,i)=>t>>>(15-i<<1)&3,t.lane4=h,t.lane8=y,t.maskH=(t,i)=>(i&~c[t])>>>0,t.maskL=d,t.mux=m,t.popCount=M,t.rotateLeft=(t,i)=>(t<<i|t>>>32-i)>>>0,t.rotateRight=(t,i)=>(t>>>i|t<<32-i)>>>0,t.same4=t=>(t>>4&15)==(15&t),t.same8=t=>(t>>8&255)==(255&t),t.setLane16=(t,i,e)=>e?m(t,i,65535):m(t,i<<16,4294901760),t.setLane2=(t,i,e)=>{const o=15-e<<1;return(~(3<<o)&t|(3&i)<<o)>>>0},t.setLane4=(t,i,e)=>{const o=7-e<<2;return(~(15<<o)&t|(15&i)<<o)>>>0},t.setLane8=(t,i,e)=>{const o=3-e<<3;return(~(255<<o)&t|(255&i)<<o)>>>0},t.splat16_32=t=>((t&=65535)<<16|t)>>>0,t.splat4_24=t=>1118481*(15&t),t.splat4_32=t=>286331153*(15&t)>>>0,t.splat8_24=t=>65793*(255&t),t.splat8_32=t=>16843009*(255&t)>>>0,t.swizzle4=(t,i,e,o,n,a,r,s,l)=>(h(t,i)<<28|h(t,e)<<24|h(t,o)<<20|h(t,n)<<16|h(t,a)<<12|h(t,r)<<8|h(t,s)<<4|h(t,l))>>>0,t.swizzle8=(t,i,e,o,n)=>(y(t,i)<<24|y(t,e)<<16|y(t,o)<<8|y(t,n))>>>0,t.u16f32=t=>((t&=65535)|4294901760*(t>>15))/32767,t.u24f32=t=>((t&=16777215)|4278190080*(t>>23))/8388607,t.u32f32=t=>(0|t)/2147483647,t.u8f32=t=>((t&=255)|4294967040*(t>>7))/127,t.uintBitsToFloat=t=>(n[0]=t,e[0]),t.uintBitsToFloat64=(t,e)=>(a?(n[1]=t,n[0]=e):(n[0]=t,n[1]=e),i[0]),Object.defineProperty(t,"__esModule",{value:!0})})); |
{ | ||
"name": "@thi.ng/binary", | ||
"version": "2.0.16", | ||
"version": "2.0.17", | ||
"description": "95+ assorted binary / bitwise operations, conversions, utilities", | ||
@@ -42,14 +42,14 @@ "module": "./index.js", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@microsoft/api-extractor": "^7.9.11", | ||
"@microsoft/api-extractor": "^7.12.0", | ||
"@types/mocha": "^8.0.3", | ||
"@types/node": "^14.6.1", | ||
"mocha": "^8.1.2", | ||
"mocha": "^8.2.1", | ||
"nyc": "^15.1.0", | ||
"ts-node": "^9.0.0", | ||
"typedoc": "^0.18.0", | ||
"typescript": "^4.0.2" | ||
"typedoc": "^0.19.2", | ||
"typescript": "^4.1.2" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^6.13.1", | ||
"tslib": "^2.0.1" | ||
"@thi.ng/api": "^6.13.2", | ||
"tslib": "^2.0.3" | ||
}, | ||
@@ -71,2 +71,3 @@ "files": [ | ||
"swizzle", | ||
"typedarray", | ||
"typescript" | ||
@@ -78,3 +79,3 @@ ], | ||
"sideEffects": false, | ||
"gitHead": "130dff672b56f789205177c2243169d33d479948" | ||
"gitHead": "3a89bdfa4c58983d5e005b3e9fb056b0351198fe" | ||
} |
@@ -45,3 +45,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (gzipped, pre-treeshake): ESM: 1.87 KB / CJS: 2.19 KB / UMD: 1.86 KB | ||
Package sizes (gzipped, pre-treeshake): ESM: 1.88 KB / CJS: 2.19 KB / UMD: 1.87 KB | ||
@@ -48,0 +48,0 @@ ## Dependencies |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93066
Updated@thi.ng/api@^6.13.2
Updatedtslib@^2.0.3