edfcore 0.5.45 → 0.5.47

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.
@@ -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.5.45";
112
+ export declare const VERSION = "0.5.47";
113
113
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -79,5 +79,5 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
79
79
  reserved: 224,
80
80
  };
81
81
  /** Published package version. Kept in sync with package.json by a test. */
82
- export const VERSION = '0.5.45';
82
+ export const VERSION = '0.5.47';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,45 @@ 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.5.47
10
+
11
+ - **Added** the transformation of appending bytes after the last record: exactly one diagnostic, and
12
+ nothing else moves. `header-recovery-advice.test.ts` covers what the two codes claim — that the
13
+ extra bytes are never decoded and that reaching them by record number is refused. Nothing covered
14
+ the transformation itself.
15
+ - It matters because the recovery is arithmetic on the file's length. `parseHeader` computes the
16
+ record count the file can actually hold and compares it with the declared one, so a change in
17
+ length reaches `recordCount`, `dataByteLength`, the timeline and everything derived from them.
18
+ Getting the recovery right and the arithmetic around it wrong would look, from any single
19
+ assertion, like the recovery working.
20
+ - The boundary is checked at the byte. Fewer bytes than a record is `PARTIAL_FINAL_RECORD` — a
21
+ writer that stopped mid-record. A whole record's worth or more is `TRAILING_BYTES` — something
22
+ else appended after a complete file. One byte either side of `recordByteLength` decides which, and
23
+ edfcore never reports both.
24
+ - Everything else is compared against the untouched file at six append sizes: the samples of every
25
+ record, the annotations and the record onsets, `recordCount`, `dataByteLength`, `spanSeconds` and
26
+ `coveredSeconds` — and the header and a full validation sweep each gain exactly one code and lose
27
+ none.
28
+
29
+ ## 0.5.46
30
+
31
+ - **Added** the same recording cut into records four different ways. "The record is the unit of I/O,
32
+ never the channel" is a heading in `design-decisions.md` and the premise of `concepts.md`. The
33
+ corollary is what a caller has to believe and nothing checked: the record geometry is a property
34
+ of how the file was written, and it decides the cost and the shape of a read while deciding
35
+ nothing about the signal.
36
+ - A writer with 128 samples at 16 Hz may store them as 8 records of 16 at one second each, or 16 of
37
+ 8 at half a second, or 2 of 64 at four seconds. Those are four different files — different record
38
+ size, different count, `recordByteLength` from 96 to 208 bytes — and one recording. All four are
39
+ built and compared: the sample stream over the whole file is identical, and so are `sampleRateHz`,
40
+ `signal.sampleCount` and `timeline.spanSeconds`, none of which is stored and all of which are
41
+ derived from the geometry that differs.
42
+ - The window is what makes this a test rather than a paragraph. Asking for `[1.25, 3.75)` — inside a
43
+ record in all four — returns four **different** chunks: record 1 plus 3 in one file, record 0 plus
44
+ 1 in another, because a read is record-aligned and the records are not the same size.
45
+ `trimToWindow` then gives the same 40 samples starting at 1.25 s in every one of them. That is the
46
+ architecture in one comparison: the chunk is the I/O and the trim is the answer.
47
+
9
48
  ## 0.5.45
10
49
 
11
50
  - **Added** the relationship between `inspectEdf` and the call it is triage for. `diagnostics.md`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.45",
3
+ "version": "0.5.47",
4
4
  "description": "Modern, typed, zero-dependency reader for EDF, EDF+, BDF and BDF+ biosignal files. Works in browsers and Node with true random access.",
5
5
  "keywords": [
6
6
  "edf",
package/src/constants.ts CHANGED
@@ -93,4 +93,4 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
93
93
  } as const;
94
94
 
95
95
  /** Published package version. Kept in sync with package.json by a test. */
96
- export const VERSION = '0.5.45';
96
+ export const VERSION = '0.5.47';