You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace "compression" with "quantization" across codebase
The library quantizes values (reduces resolution via right-shift)
but does not compress data. The caller chooses the storage type.
Replaced all "compress/decompress" wording with "quantize/restore"
in NatSpec, README, AGENTS.md, copilot instructions, and tests.
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
`uint-quantization-lib` is a pure-function Solidity library for shift-based `uint256`lossy compression. The core mechanism is floor quantization via right-shifting. A `Quant` value type packs `(discardedBitWidth, encodedBitWidth)` into a single `uint16`, making the compression scheme explicit and reusable. The recommended pattern is `immutable` + `create(discardedBitWidth, encodedBitWidth)`.
7
+
`uint-quantization-lib` is a pure-function Solidity library for shift-based `uint256`quantization. The core mechanism is floor quantization via right-shifting. A `Quant` value type packs `(discardedBitWidth, encodedBitWidth)` into a single `uint16`, making the quantization scheme explicit and reusable. The recommended pattern is `immutable` + `create(discardedBitWidth, encodedBitWidth)`.
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
On-chain values routinely carry more resolution than the protocol needs, but storage charges for every bit you store, not every bit you use. Unnecessary resolution widens structs, fills extra slots, and costs 20,000 gas per cold write. You do not have to pay for resolution you do not use.
7
7
8
-
This library quantizes `uint256` values via right-shift compression, packing more fields per storage slot and cutting gas on every write.
8
+
This library quantizes `uint256` values via right-shift, packing more fields per storage slot and cutting gas on every write.
9
9
10
10
**Quick start:**
11
11
@@ -14,8 +14,8 @@ import {Quant, UintQuantizationLib} from "uint-quantization-lib/src/UintQuantiza
0 commit comments