Repository navigation
Commit 8dd33e3
committed
fix(codecs)!: BytesCodec defaults to little-endian on every host
`BytesCodec()` defaulted to `sys.byteorder`, so the same code wrote
big-endian chunks on s390x and little-endian chunks elsewhere. The bytes
codec originally defaulted to "little"; the host default came in as a side
effect of replacing attrs with dataclasses (zarr-developers#1660), and was later pinned
by a test that only restated it. `"little"` also matches
`default_serializer_v3`.
Chunks written on big-endian hosts with a bare `BytesCodec()` are now
little-endian. Chunks written before this change remain readable, because
the codec records its byte order in the metadata.
Refs zarr-developers#3438
Assisted-by: ClaudeCode:claude-opus-5-51 parent 5a52062 commit 8dd33e3
3 files changed
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | | - | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
295 | | - | |
| 294 | + | |
296 | 295 | | |
297 | | - | |
298 | | - | |
299 | | - | |
| 296 | + | |
| 297 | + | |
300 | 298 | | |
301 | 299 | | |
302 | | - | |
| 300 | + | |
303 | 301 | | |
304 | 302 | | |
305 | 303 | | |
| |||
0 commit comments