Uh oh!
There was an error while loading. Please reload this page.
MOD-14010 support Homogenues array floating point forcing(deserializa… - #17
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
galcohen-redislabs
commented
Feb 23, 2026
Did you look at c2pa_cbor? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AvivDavid23
commented
Feb 23, 2026
@galcohen-redislabs I can try that, although it doesnt have a major release, and very low usage: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
GuyAv46
commented
Apr 16, 2026
What are the implications for the C API? How can we use this optimization? |
AvivDavid23
commented
Apr 16, 2026
|

…tion path only)
no production-quality Rust CBOR library implements RFC 8746 natively (the only candidate,
cbor_enhanced, has been unmaintained since 2020 and lacks F16-LE and BF16 support), so a thinIValue ↔ ciborium::Valueconversion layer is still neededSize comparison (vs JSON baseline)
Example payloads
1 — FP32 typed array (1 000 elements, stored with FPHA F32 tag)
2 — FP64 typed array (1 000 elements, stored with FPHA F64 tag)
3 — Heterogeneous float array (same data, no FPHA hint)
Same JSON as above; without an FPHA hint the array is stored as
ArrayHetero(each element tagged individually). zstd still achieves the same ratio because
the repeated tag bytes compress well.
4 — String-heavy object (50 keys)
{ "key_0": "value_0_some_longer_string_here", "key_1": "value_1_some_longer_string_here", "key_2": "value_2_some_longer_string_here", ... // 50 keys total }5 — Small mixed object
{ "name": "Alice", "age": 30, "scores": [1, 2, 3, null, true, "bonus"], "meta": {"active": true, "level": 42} }6 — Nested FP32 arrays + string
{ "a": [0.0, 0.1, 0.2, ...], // 100 F32 elements"b": [0.0, 0.1, 0.2, ...], // 100 F32 elements"label": "test" }7 — Big mixed JSON (200 records, heterogeneous embeddings)
[ { "id": 0, "name": "user_0", "active": true, "score": 0.0, "tags": ["alpha", "beta", "gamma"], "embedding": [0.0, 0.001, 0.002, ...] // 32 floats }, // ... 200 records total, repeated schema ]The repeated key names (
"id","name","active","score","tags","embedding")across 200 records are what zstd compresses so aggressively here.
8 — Repeated-string records (500 records, RED-141886 scenario)
[ {"id": 0, "status": "active", "region": "us-east-1", "tier": "free", "owner": "team-a", "count": 0}, {"id": 1, "status": "inactive", "region": "eu-west-1", "tier": "standard", "owner": "team-b", "count": 10}, // ... 500 records; status/region/tier/owner values repeat from a small fixed set ]Note
High Risk
Adds new CBOR/zstd encoding and changes core
IArrayfallible APIs to return a newIJsonError, which can affect downstream callers and data interchange correctness.Overview
Adds optional floating-point homogeneous array (FPHA) enforcement during JSON deserialization via
FPHAConfig/IValueDeserSeed, plusIArray::push_with_fp_typeto forceF16/BF16/F32/F64storage and reject out-of-range values.Introduces a new
cbormodule withencode/decodeand zstd-compressed variants that preserve typed array tags using RFC 8746 (with a private BF16 tag), and surfaces this API fromlib.rs.Refactors array-related fallible APIs to return
IJsonError(wrapping allocation failures and new range errors), adds extensive unit tests, and expands CI fuzzing to cover CBOR decode + round-trip (with updated fuzz runtime/memory flags).Written by Cursor Bugbot for commit 9675e63. This will update automatically on new commits. Configure here.