Skip to content

Commit 3891697

Browse files
dfa1claude
andauthored
chore: normalize spelling to American English (#59)
Apply the American-English convention (CLAUDE.md) across javadoc, comments, and internal identifiers: recognise/optimise/finalise/serialise/normalise/ behaviour/modelled/labelled -> American forms. No public API change. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent fe929f9 commit 3891697

17 files changed

Lines changed: 36 additions & 36 deletions

adr/0001-ffm-over-jni.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Native symbols bind to `MethodHandle`s in `Bindings`; the library targets JDK
3232
`--enable-native-access`.
3333

3434
### Risks to manage
35-
- FFM is young; signatures/restrictions may evolve. Centralised in `Bindings`
36-
and `NativeCall` so changes are localised.
35+
- FFM is young; signatures/restrictions may evolve. Centralized in `Bindings`
36+
and `NativeCall` so changes are localized.
3737

3838
## Alternatives considered
3939

adr/0002-zig-cc-native-build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ it is idempotent (skips if the library exists).
3131
- `zig cc` is a clang wrapper, not the zstd-blessed build path.
3232

3333
### Risks to manage
34-
- Zig is pre-1.0; `zig cc` flag behaviour can shift between versions. The Zig
34+
- Zig is pre-1.0; `zig cc` flag behavior can shift between versions. The Zig
3535
version is **pinned** (0.16.0) in CI; upgrades require a re-test.
3636

3737
## Alternatives considered

adr/0009-nativeobject-idempotent-close.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Native contexts and dictionaries (CCtx, DCtx, CDict, DDict) own off-heap memory
1010
that must be freed via their zstd `ZSTD_free*` calls. Java's GC does not free
11-
native memory; double-free is undefined behaviour. The lifecycle model must be
11+
native memory; double-free is undefined behavior. The lifecycle model must be
1212
deterministic and safe to call twice.
1313

1414
## Decision

adr/0012-benchmark-methodology.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ Benchmarks live in the `benchmark/` module (JMH), comparing zstd-java
1818

1919
Two payload families:
2020

21-
- **Synthetic, semi-compressible** (`BenchData`, ~3x ratio) parameterised over
21+
- **Synthetic, semi-compressible** (`BenchData`, ~3x ratio) parameterized over
2222
*sizes* — exercises the bandwidth regime.
23-
- **The vendored golden corpus** (`GoldenCorpusBenchmark`) parameterised over
23+
- **The vendored golden corpus** (`GoldenCorpusBenchmark`) parameterized over
2424
*real files* — exercises per-call native-boundary overhead, where FFM-vs-JNI
2525
fixed costs show up.
2626

2727
Published numbers in `docs/benchmarks.md` state the host, JDK, dependency
28-
versions, and the JMH run parameters. Quick low-iteration runs are labelled
28+
versions, and the JMH run parameters. Quick low-iteration runs are labeled
2929
**directional, not publication-grade**; publication numbers use higher fork and
3030
iteration counts.
3131

docs/how-to.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Task-focused recipes. Each assumes you have the library on the classpath (see th
55

66
## Compress on a hot path
77

8-
Reuse a context to amortise native allocation across many calls:
8+
Reuse a context to amortize native allocation across many calls:
99

1010
```java
1111
try (ZstdCompressContext cctx = new ZstdCompressContext().level(19);
@@ -39,7 +39,7 @@ try (ZstdCompressContext cctx = new ZstdCompressContext().level(19)) {
3939
}
4040
```
4141

42-
`ZstdDecompressContext.reset(...)` works the same way. Reuse alone amortises
42+
`ZstdDecompressContext.reset(...)` works the same way. Reuse alone amortizes
4343
allocation; reset lets a long-lived or pooled context return to a known state
4444
without churning native memory.
4545

docs/supported.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ rather than the deprecated `ZSTD_getDecompressedSize`.
8282
1. ~~**Streaming**~~ — done: `ZstdOutputStream` / `ZstdInputStream` (`compressStream2`, `decompressStream`, bounded buffers, dictionary constructors, `pledgedSrcSize` via `withPledgedSize`). Remaining: `MemorySegment`-buffer driver.
8383
2. ~~**Advanced parameters**~~ — done: every `ZSTD_cParameter`/`ZSTD_dParameter` via `ZstdCompressParameter`/`ZstdDecompressParameter` (+ `bounds()`), on both contexts; `pledgedSrcSize`. `nbWorkers` is settable but inert until the native build enables multithreading.
8484
3. ~~**Frame inspection**~~ — done: `ZstdFrame` (`isFrame`, `header`, `compressedSize`, `decompressedBound`, `decompressedSize`, `dictId`, skippable, `getFrameProgression`); dict-id from raw/CDict/DDict.
85-
4. ~~**Better dictionaries**~~ — done: COVER / fast-COVER optimisers, `finalizeDictionary`, `getDictHeaderSize`.
85+
4. ~~**Better dictionaries**~~ — done: COVER / fast-COVER optimizers, `finalizeDictionary`, `getDictHeaderSize`.
8686
5. ~~**Typed errors**~~ — done: `ZstdException.code()` returns `ZstdErrorCode` (via `getErrorCode`).
8787

8888
## Full symbol table

integration-tests/src/test/java/io/github/dfa1/zstd/it/GoldenCorpusTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private static Path locateCorpus() {
5252
}
5353
throw new IllegalStateException(
5454
"golden corpus not found: third_party/zstd/tests is missing — "
55-
+ "initialise the zstd submodule (git submodule update --init --recursive)");
55+
+ "initialize the zstd submodule (git submodule update --init --recursive)");
5656
}
5757

5858
private static Stream<Arguments> filesIn(String subdir, String suffix) {

integration-tests/src/test/java/io/github/dfa1/zstd/it/ZstdInteropExtrasTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void javaRejectsCorruptedChecksum() {
115115
}
116116

117117
/// Skippable frames carry application metadata the decoder must pass over. A
118-
/// skippable frame written by this library must be recognised and skipped by
118+
/// skippable frame written by this library must be recognized and skipped by
119119
/// the zstd-jni stream decoder, leaving the following real frame intact.
120120
@Nested
121121
class Skippable {

zstd/src/main/java/io/github/dfa1/zstd/Bindings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/// Signatures and semantics follow the
1414
/// [official manual](https://facebook.github.io/zstd/doc/api_manual_latest.html).
1515
///
16-
/// `size_t` and `unsigned long long` are modelled as
16+
/// `size_t` and `unsigned long long` are modeled as
1717
/// [java.lang.foreign.ValueLayout#JAVA_LONG] (LP64); the public API guards
1818
/// against negative interpretations where zstd uses sentinel values.
1919
///

zstd/src/main/java/io/github/dfa1/zstd/ZstdCompressContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/// A reusable compression context.
88
///
9-
/// Reusing one context across many [#compress] calls amortises native
9+
/// Reusing one context across many [#compress] calls amortizes native
1010
/// state allocation, making it cheaper than the stateless [Zstd#compress]
1111
/// on hot paths. Not thread-safe: confine an instance to one thread or pool it.
1212
///

0 commit comments

Comments
 (0)