edfcore 0.4.425 → 0.4.427
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/docs/CHANGELOG.md +42 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -109,5 +109,5 @@ export declare const SIGNAL_FIELD_BLOCK_OFFSETS: {
|
|
|
109
109
|
readonly reserved: 224;
|
|
110
110
|
};
|
|
111
111
|
/** Published package version. Kept in sync with package.json by a test. */
|
|
112
|
-
export declare const VERSION = "0.4.
|
|
112
|
+
export declare const VERSION = "0.4.427";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,48 @@ alone does not tell you whether you were affected.
|
|
|
6
6
|
edfcore is pre-1.0. Patch releases have carried behaviour changes where the old behaviour was a
|
|
7
7
|
defect; those are called out below.
|
|
8
8
|
|
|
9
|
+
## 0.4.427
|
|
10
|
+
|
|
11
|
+
- **Added** a property test for `trimToWindow` against the rule it states rather than the examples
|
|
12
|
+
it was written from. The source says which samples belong in a window in one line — "Sample j is
|
|
13
|
+
in the window when `ceil(j * D / S)` is in `[R, Rend)`" — and what the code does is a closed form
|
|
14
|
+
derived from it: two `floorDiv`s over bigint products, with the derivation written above them. A
|
|
15
|
+
closed form is exactly where an off-by-one lives, and the derivation is the part a reader takes
|
|
16
|
+
on trust.
|
|
17
|
+
- So the rule is implemented the obvious way, asking every sample, and the two must select the same
|
|
18
|
+
set for arbitrary geometries and windows. The naive version is too slow for a library and is
|
|
19
|
+
obviously right, which is the only pairing worth testing a closed form against.
|
|
20
|
+
- The rounding it turns on is not incidental. 256 samples in a one-second record puts sample 1 at
|
|
21
|
+
39,062.5 ticks, published as 39,063, and selecting on the exact start rather than the published
|
|
22
|
+
one excluded that sample from a window beginning at its own published start — half of all indices
|
|
23
|
+
at that rate, and at 128 samples per 0.29 s a one-sample window came back empty (0.3.56).
|
|
24
|
+
Geometries whose boundaries miss whole ticks are generated deliberately, because the ones that
|
|
25
|
+
land on them cannot tell the two rules apart.
|
|
26
|
+
- Three obligations from the docblock come with it, none previously checked in general: adjacent
|
|
27
|
+
windows partition a chunk exactly, a window covering the chunk is the identity, and the result is
|
|
28
|
+
a view rather than a copy.
|
|
29
|
+
|
|
30
|
+
## 0.4.426
|
|
31
|
+
|
|
32
|
+
- **Added** a property test that the cache is invisible at every size it can be configured to.
|
|
33
|
+
`api-sources.md` describes `cachedSource` as "removed by deleting one wrapper from the expression
|
|
34
|
+
that built the source", which is the property a caller relies on when they add it: the reads get
|
|
35
|
+
cheaper and nothing else changes.
|
|
36
|
+
- The existing demonstration is one script of six reads at the default block size, where the 1 MiB
|
|
37
|
+
block swallows the fixture whole — so it demonstrates a cache that never evicts, never stitches
|
|
38
|
+
and never splits. The interesting sizes are the other ones: a block smaller than a read makes
|
|
39
|
+
every answer a stitch, a budget smaller than a few blocks makes the cache evict mid-sequence, and
|
|
40
|
+
a read wider than the budget bypasses the cache entirely. All three are reachable from an
|
|
41
|
+
ordinary configuration — blocks sized to a record, a budget sized to a phone.
|
|
42
|
+
- The failure is not a crash. Stitching arithmetic off by a block start returns the right number of
|
|
43
|
+
bytes from the right file, taken from the wrong offset: a header that parses, samples that plot,
|
|
44
|
+
and a recording quietly shifted.
|
|
45
|
+
- The copy rule is scoped rather than assumed. It is asserted for reads the cache actually serves;
|
|
46
|
+
a read wider than the whole budget returns the wrapped source's own array by design, because
|
|
47
|
+
nothing is retained on that path, and `cached.ts` says so. Each property builds its fixture
|
|
48
|
+
fresh, since a test that writes into a result would otherwise edit the bytes it compares against
|
|
49
|
+
and pass on the damage.
|
|
50
|
+
|
|
9
51
|
## 0.4.425
|
|
10
52
|
|
|
11
53
|
- **Added** tests for the one sentence `api-reading.md` gives about the shape of `signalIndices`:
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED