@thi.ng/bitfield
Advanced tools
Comparing version 2.3.40 to 2.3.41
@@ -45,7 +45,5 @@ import { align } from "@thi.ng/binary/align"; | ||
const x = data[i >>> 3]; | ||
if (!x) | ||
continue; | ||
if (!x) continue; | ||
for (let k = 31 - Math.clz32(x); k >= 0; k--) { | ||
if (x & 1 << k) | ||
yield i + 7 - k; | ||
if (x & 1 << k) yield i + 7 - k; | ||
} | ||
@@ -70,4 +68,3 @@ } | ||
n = align(n, 8); | ||
if (n === this.n) | ||
return this; | ||
if (n === this.n) return this; | ||
const dest = new Uint8Array(n >>> 3); | ||
@@ -74,0 +71,0 @@ dest.set(this.data.slice(0, dest.length)); |
@@ -43,4 +43,3 @@ import { align } from "@thi.ng/binary/align"; | ||
n = align(n, 8); | ||
if (m === this.m && n === this.n) | ||
return this; | ||
if (m === this.m && n === this.n) return this; | ||
const dstride = n >>> 3; | ||
@@ -47,0 +46,0 @@ const sstride = this.stride; |
# Change Log | ||
- **Last updated**: 2024-04-23T07:02:17Z | ||
- **Last updated**: 2024-05-08T18:24:31Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "@thi.ng/bitfield", | ||
"version": "2.3.40", | ||
"version": "2.3.41", | ||
"description": "1D / 2D bit field implementations", | ||
@@ -39,12 +39,12 @@ "type": "module", | ||
"dependencies": { | ||
"@thi.ng/api": "^8.11.1", | ||
"@thi.ng/binary": "^3.4.24", | ||
"@thi.ng/errors": "^2.5.6", | ||
"@thi.ng/strings": "^3.7.32" | ||
"@thi.ng/api": "^8.11.2", | ||
"@thi.ng/binary": "^3.4.25", | ||
"@thi.ng/errors": "^2.5.7", | ||
"@thi.ng/strings": "^3.7.33" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.43.0", | ||
"esbuild": "^0.20.2", | ||
"typedoc": "^0.25.12", | ||
"typescript": "^5.4.3" | ||
"@microsoft/api-extractor": "^7.43.2", | ||
"esbuild": "^0.21.1", | ||
"typedoc": "^0.25.13", | ||
"typescript": "^5.4.5" | ||
}, | ||
@@ -91,3 +91,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n" | ||
"gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n" | ||
} |
import { B8 } from "@thi.ng/strings/radix"; | ||
const toString = (data) => [...data].map(B8).join(""); | ||
const binOp = (dest, src, op) => { | ||
for (let i = src.length; i-- > 0; ) | ||
dest[i] = op(src[i], dest[i]); | ||
for (let i = src.length; i-- > 0; ) dest[i] = op(src[i], dest[i]); | ||
}; | ||
@@ -7,0 +6,0 @@ export { |
41570
582
Updated@thi.ng/api@^8.11.2
Updated@thi.ng/binary@^3.4.25
Updated@thi.ng/errors@^2.5.7
Updated@thi.ng/strings@^3.7.33