Skip to content

Commit 82270cc

Browse files
committed
Clarify shift and targetBits as scheme settings in API table
1 parent 38a5786 commit 82270cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ The `Quant` value type is a `uint16` with the following bit layout:
4646
| Function | Description |
4747
|---|---|
4848
| `UintQuantizationLib.create(shift, targetBits)` | Creates a `Quant` scheme from readable parameters. Reverts with `BadConfig` when shift >= 256, targetBits == 0, targetBits >= 256, or shift + targetBits > 256. |
49-
| `q.shift()` | Returns the shift component (bits discarded during encoding). |
50-
| `q.targetBits()` | Returns the targetBits component (bit-width of the encoded value). |
49+
| `q.shift()` | Number of low bits discarded during encoding (set at creation). |
50+
| `q.targetBits()` | Bit-width of the encoded value (set at creation). |
5151
| `q.encode(value)` | Floor-encodes `value`. Reverts with `Overflow` when `value > max(q)`. |
5252
| `q.encode(value, true)` | Strict mode: also reverts with `NotAligned` when `value` is not step-aligned. |
5353
| `q.decode(encoded)` | Left-shifts `encoded` by shift, restoring discarded bits as zeros (lower bound). |

0 commit comments

Comments
 (0)