XiaoBinGan
a3acfcf003
fix(entropy): keep the whole-file census in a counter that cannot wrap
...
The previous commit moved the whole-file census into a `Uint32Array`. That bin wraps
at 2^32 occurrences of one byte, and the service admits files up to
`Number.MAX_SAFE_INTEGER`, so a 6 GiB zero-filled file reported
`entropyFromCounts(counts, size)` = 0.5283 instead of 0.
Measured on 8 MiB, three interleaved runs against the compiled counter:
| form | time |
| --- | --- |
| `for...of` + `Float64Array` | 79.59ms |
| indexed + `Float64Array` | 9.26ms |
| indexed + `Uint32Array` | 9.28ms |
The 8x comes from the indexed reads, not from the integer bin, so exactness costs
nothing here. The bounded block counter stays bounded by `block_size` (max 65536) and
also uses a `Float64Array` so the two counters read the same.
`wholeFileByteCounts` names the counter the service uses, so the test can assert the
property that matters: a count above 2^32 survives. It fails on the previous commit.
`src/domain/native` + `src/application/binaryDiagnostics`: 443 passing. One test fails
on this Windows host before and after this diff — `reports a changed artifact when its
parent directory moves during streaming` fails with `ENOENT` on a directory rename.
`tsc` 0; `npm run lint` 0 errors; `knip` 0.
2026-11-21 21:12:12 +01:00
..
2026-11-18 13:06:25 -05:00
2026-11-21 10:40:12 +00:00
2026-11-16 06:28:01 +08:00
2026-11-16 03:56:10 +08:00
2026-11-20 04:10:06 +00:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-20 12:34:40 +00:00
2026-11-21 20:06:57 +01:00
2026-11-21 21:12:12 +01:00
2026-11-16 03:56:10 +08:00
2026-11-18 13:05:37 -05:00
2026-11-20 16:06:14 +00:00
2026-11-16 06:28:01 +08:00
2026-11-20 12:45:45 +00:00
2026-11-19 07:44:30 +00:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-20 04:10:06 +00:00
2026-11-16 06:28:01 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 07:05:30 +08:00
2026-11-21 03:35:10 +00:00
2026-11-17 14:40:38 +00:00
2026-11-21 21:10:51 +01:00
2026-11-16 03:56:10 +08:00
2026-11-16 07:55:43 +08:00
2026-11-16 03:56:10 +08:00
2026-11-20 04:22:32 +00:00
2026-11-16 08:39:18 +08:00
2026-11-17 13:13:02 +00:00
2026-11-16 09:48:52 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 09:28:35 +08:00
2026-11-16 06:28:01 +08:00
2026-11-20 00:00:10 +00:00
2026-11-16 20:39:33 -05:00
2026-11-16 06:28:01 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 06:28:01 +08:00
2026-11-19 21:19:35 +00:00
2026-11-15 20:58:47 -05:00
2026-11-18 18:27:29 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 06:28:01 +08:00
2026-10-26 17:35:18 +08:00
2026-11-17 08:19:52 +00:00
2026-11-17 14:16:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-20 04:22:32 +00:00
2026-11-11 20:16:24 +08:00
2026-11-19 11:24:09 +00:00
2026-11-20 04:10:06 +00:00
2026-11-21 20:56:47 +01:00
2026-11-13 04:45:16 -05:00
2026-11-20 04:10:06 +00:00
2026-11-16 07:28:20 +08:00
2026-11-16 03:56:10 +08:00
2026-11-20 17:58:27 -05:00
2026-11-11 17:15:47 +08:00
2026-11-16 07:04:34 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-21 17:22:41 +00:00
2026-11-16 03:56:10 +08:00
2026-11-11 17:15:47 +08:00
2026-11-16 06:28:01 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-10-27 07:25:23 +08:00
2026-11-17 18:48:24 -05:00
2026-11-15 23:52:56 +08:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:05:55 +08:00
2026-11-01 13:30:21 +08:00
2026-11-13 04:45:16 -05:00
2026-11-16 07:05:30 +08:00
2026-11-15 21:31:35 +08:00
2026-11-17 14:16:24 -05:00
2026-11-15 10:13:14 -05:00
2026-11-16 03:56:10 +08:00
2026-11-15 21:31:35 +08:00
2026-11-15 21:31:35 +08:00
2026-11-15 21:31:35 +08:00
2026-11-14 14:37:04 -05:00
2026-11-15 21:31:35 +08:00
2026-11-15 21:31:35 +08:00
2026-11-15 19:39:33 +08:00
2026-11-19 11:18:43 +08:00
2026-11-16 07:05:30 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-21 18:50:36 +00:00
2026-11-16 07:05:30 +08:00
2026-11-11 17:42:53 -05:00
2026-11-18 14:31:34 -05:00
2026-11-21 18:50:36 +00:00
2026-11-14 04:08:37 -05:00
2026-11-15 19:39:33 +08:00
2026-11-21 18:50:36 +00:00
2026-11-15 19:39:33 +08:00
2026-11-20 00:00:10 +00:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-19 03:54:56 +00:00
2026-11-19 07:31:26 -05:00
2026-11-16 16:30:22 -05:00
2026-11-16 05:31:37 +08:00
2026-11-16 05:31:37 +08:00
2026-11-17 19:58:40 +08:00
2026-11-16 03:56:10 +08:00
2026-11-18 14:31:34 -05:00
2026-11-17 19:58:40 +08:00
2026-11-11 04:10:32 -05:00
2026-11-16 03:56:10 +08:00
2026-11-21 00:23:18 -08:00
2026-11-21 00:22:38 -08:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-05 03:26:31 +08:00
2026-11-19 07:31:26 -05:00
2026-11-19 03:30:41 +00:00
2026-11-19 03:30:41 +00:00
2026-11-15 18:38:24 +08:00
2026-11-21 09:07:28 +00:00
2026-11-16 06:28:01 +08:00
2026-11-18 18:27:29 -05:00
2026-11-16 07:05:30 +08:00
2026-11-14 04:08:37 -05:00
2026-11-14 04:08:37 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-15 20:53:36 -05:00
2026-10-31 11:11:05 -07:00
2026-10-28 14:12:39 +08:00
2026-11-15 19:54:39 +08:00
2026-11-15 21:31:35 +08:00
2026-11-15 20:53:36 -05:00
2026-10-27 08:11:18 +08:00
2026-11-20 21:35:24 +00:00
2026-11-16 10:59:18 +08:00
2026-10-27 09:26:40 +08:00
2026-11-14 05:36:32 +01:00
2026-11-16 06:28:01 +08:00
2026-11-17 18:38:27 -05:00
2026-11-14 19:00:38 -05:00
2026-11-16 10:59:18 +08:00
2026-11-16 20:55:14 -05:00
2026-11-16 07:05:30 +08:00
2026-11-15 19:39:33 +08:00
2026-11-13 04:45:16 -05:00
2026-11-16 10:59:18 +08:00
2026-10-27 08:47:16 +08:00
2026-11-13 04:45:16 -05:00
2026-11-11 17:28:23 +08:00
2026-11-16 10:59:18 +08:00
2026-11-14 19:28:38 +08:00
2026-11-15 18:38:24 +08:00
2026-11-19 13:41:40 +00:00
2026-11-19 13:41:40 +00:00
2026-11-18 10:05:23 -05:00
2026-11-16 04:27:07 +08:00
2026-11-16 04:27:07 +08:00
2026-11-16 04:27:07 +08:00
2026-11-16 07:05:30 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-19 11:18:43 +08:00
2026-11-16 03:56:10 +08:00
2026-11-15 19:54:39 +08:00
2026-11-17 18:48:24 -05:00
2026-11-15 19:39:33 +08:00
2026-11-16 03:56:10 +08:00
2026-11-19 15:37:21 +00:00
2026-11-19 15:59:06 +00:00
2026-11-19 15:37:21 +00:00
2026-11-19 08:21:16 -05:00
2026-11-21 18:50:36 +00:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-15 20:06:47 +08:00
2026-11-16 03:56:10 +08:00
2026-11-15 20:53:36 -05:00
2026-11-14 14:16:39 +01:00
2026-11-08 16:39:20 +00:00
2026-11-16 06:28:01 +08:00
2026-11-09 18:28:13 +08:00
2026-11-16 06:28:01 +08:00
2026-11-09 18:28:13 +08:00
2026-11-16 06:28:01 +08:00
2026-10-29 07:54:41 +08:00
2026-11-14 14:16:39 +01:00
2026-11-16 06:28:01 +08:00
2026-10-31 02:23:47 +08:00
2026-11-11 21:39:09 +08:00
2026-11-16 03:56:10 +08:00
2026-11-11 18:23:15 +08:00
2026-11-15 20:53:36 -05:00
2026-11-21 20:27:50 +01:00
2026-11-16 03:56:10 +08:00
2026-11-16 00:05:14 +08:00
2026-11-21 20:27:50 +01:00
2026-11-12 22:05:32 -05:00
2026-11-17 08:28:59 -05:00
2026-11-17 19:58:40 +08:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-16 05:31:37 +08:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-21 18:50:36 +00:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-21 18:50:36 +00:00
2026-11-14 05:36:32 +01:00
2026-11-14 05:36:32 +01:00
2026-11-17 18:48:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-15 20:53:36 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 07:05:30 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 07:05:30 +08:00
2026-11-16 03:56:10 +08:00
2026-11-17 18:48:24 -05:00
2026-11-10 23:58:52 -05:00
2026-11-18 09:11:08 -05:00
2026-11-20 04:10:06 +00:00
2026-11-16 07:05:30 +08:00
2026-11-16 07:05:30 +08:00
2026-11-21 18:50:36 +00:00
2026-11-08 16:39:20 +00:00
2026-11-16 07:05:30 +08:00
2026-11-15 19:54:39 +08:00
2026-11-15 20:53:36 -05:00
2026-11-21 06:02:44 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 06:28:01 +08:00
2026-11-16 06:28:01 +08:00
2026-11-16 03:56:10 +08:00
2026-11-11 02:28:27 -05:00
2026-11-16 07:04:34 +08:00
2026-11-19 13:19:27 +00:00
2026-11-21 05:41:12 -05:00
2026-11-15 20:53:36 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 06:28:01 +08:00
2026-11-18 18:27:29 -05:00
2026-11-16 03:56:10 +08:00
2026-11-16 03:56:10 +08:00
2026-11-14 04:08:37 -05:00
2026-11-14 04:08:37 -05:00
2026-10-29 10:12:09 +08:00