Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
577 commits
Select commit Hold shift + click to select a range
b0ca9f8
add a cmake 3.20.2 build test (#423)
Cyan4973 Mar 8, 2026
6c7605a
Add 8-bit numeric profiles to `zli` (#483)
Cyan4973 Mar 9, 2026
9158ccc
Split compiler tests by stage (#457)
daniellerozenblit Mar 9, 2026
5d994bb
fbcode/openzl/dev/tools/compressor_serialization (#481)
Mar 9, 2026
8dba954
Fuzzer fixes in ROLZ (#475)
terrelln Mar 9, 2026
5133066
fbcode/openzl/dev/examples/py (#480)
Mar 9, 2026
45b2005
Support variable assignments in codegen (#467)
daniellerozenblit Mar 9, 2026
703405f
Add member op to grammar (#468)
daniellerozenblit Mar 9, 2026
8d1d577
Handle member op in dead var optimizer (#471)
daniellerozenblit Mar 9, 2026
3585ecf
Add bitsplit_fp codec and tests (#431)
mmandina Mar 10, 2026
7d099dd
Support VO output verification in codec tests (#470)
mmandina Mar 10, 2026
2d3737b
Add specialized bitSplit encode fast paths for fp16/fp32/fp64 with un…
mmandina Mar 10, 2026
9c340ab
Add method to save input stream (#436)
terrelln Mar 10, 2026
c9ed669
Work on bucketing optimizations (#435)
terrelln Mar 10, 2026
8036a2f
Fix Bitpack fuzzer issue (#490)
kevinjzhang Mar 10, 2026
29d2569
Handle member op in semantic analyzer (#472)
daniellerozenblit Mar 10, 2026
ef84724
Fix issues found by component fuzzer (#476)
terrelln Mar 10, 2026
5987372
Fix fuzzer health failures (#489)
kevinjzhang Mar 11, 2026
0e6e4f0
visualization stream preview (#366)
jlee303 Mar 11, 2026
e188c9e
minor optimization: skip one useless conversion operation (#482)
Cyan4973 Mar 12, 2026
8a8b31a
Split register allocation logic into utility class (#474)
daniellerozenblit Mar 12, 2026
014701c
Prevent variable reassignment (#485)
daniellerozenblit Mar 12, 2026
d085ba2
Add assume support for builtin fields and record types (#484)
daniellerozenblit Mar 12, 2026
662dec2
Drop unused -cpp2-reflection deps (fbcode) (#496)
iahs Mar 12, 2026
1dc4f92
move streamdump to chunktrace (#459)
jlee303 Mar 12, 2026
3bcd9ac
fix os.getenv bool handling (#497)
jlee303 Mar 12, 2026
13e2d2a
Add Partition codec (#464)
terrelln Mar 13, 2026
8d118a5
Opt DTransformManager into rich error messages (#463)
terrelln Mar 13, 2026
9374b2e
Add a segmenter to the PyTorch model parser (#491)
terrelln Mar 13, 2026
6e1d03b
Rename ZL_DataInfo to ZL_DCtx_DataInfo (#493)
terrelln Mar 13, 2026
cf7125b
Fix lifetime of decompressArena and rename to chunkArena (#492)
terrelln Mar 13, 2026
62a2634
Refactor dataInfos in decompress2.c & store node info (#494)
terrelln Mar 13, 2026
f5f5f7f
Fix segmenter allocation bug (#509)
terrelln Mar 13, 2026
e0af64f
Windows precompiled binaries (#425)
zhiningli Mar 13, 2026
ce19c35
Fix 8GB allocation crash in ZSTD parameter validation (#512)
kevinjzhang Mar 13, 2026
134526e
Fix fuzzing issues compress bounds (#514)
kevinjzhang Mar 13, 2026
bc8564e
Throw when bitSplit parameters are invalid (#513)
kevinjzhang Mar 13, 2026
6d95bbd
Fix bug in partition codec (#520)
terrelln Mar 14, 2026
c81915b
Fix splitN serializability issue (#495)
kevinjzhang Mar 14, 2026
9409725
use explicit types in Cursor::write (assorted) (#498)
yfeldblum Mar 15, 2026
565b5ba
Add support for parameterized records (parsing) (#487)
daniellerozenblit Mar 15, 2026
a392cb3
Add support for parameterized records (codegen) (#486)
daniellerozenblit Mar 15, 2026
7034e7c
Refactor optimizer passes for improved code organization (#499)
daniellerozenblit Mar 15, 2026
f684700
Throw exception when input types are incompatible (#521)
kevinjzhang Mar 16, 2026
a3ab4b1
Add parser and semantic analysis support for when blocks (#504)
daniellerozenblit Mar 16, 2026
8d04b8f
Add basic optimizer support for when blocks (#500)
daniellerozenblit Mar 16, 2026
31a489a
Add jump_if VM opcode (#502)
daniellerozenblit Mar 16, 2026
0c21fd1
Implement split by ext parser (#527)
kevinjzhang Mar 16, 2026
0036732
Stage 1: Rename WAYPOINT to CWAYPOINT for compress introspection (#511)
Victor-C-Zhang Mar 16, 2026
6d95af9
Return illegal on using anchor name instead of crashing (#529)
kevinjzhang Mar 17, 2026
328aecd
Add ZL_bitExtract and ZL_bitDeposit helpers (#519)
terrelln Mar 17, 2026
1952105
Throw when bitUnpack parameters are invalid (#531)
kevinjzhang Mar 17, 2026
bb4497a
Fix DivideBy component fuzzing error (#530)
kevinjzhang Mar 17, 2026
3ccdfb7
Make xgboost dep conditional (#466)
jlee303 Mar 17, 2026
c5b1734
Stage 2: Add C-level decompress introspection hooks (#518)
Victor-C-Zhang Mar 18, 2026
2e73af0
Introduce new ASTRecordField type (#503)
daniellerozenblit Mar 18, 2026
0653f7b
Disallow member access on conditional record fields (#505)
daniellerozenblit Mar 18, 2026
59a0000
Implement codegen for when blocks (#501)
daniellerozenblit Mar 18, 2026
919463c
move usages of `ZL_Compressor_cloneNode()` to `ZL_Compressor_register…
Victor-C-Zhang Mar 19, 2026
57742bf
Stage 3a: Rename and refactor compress trace files, extract shared Ch…
Victor-C-Zhang Mar 23, 2026
144c8cb
Stage 3b: Add C++ decompress trace infrastructure (#539)
Victor-C-Zhang Mar 23, 2026
e9393ba
Allow assignments of runtime values (#507)
daniellerozenblit Mar 23, 2026
6d667d8
Implement abs operator (#523)
daniellerozenblit Mar 23, 2026
1666428
Easy: Use Codegen default constructor in tests (#524)
daniellerozenblit Mar 23, 2026
1579883
Easy: Update the SDDL2 profile to take a data description file (#526)
daniellerozenblit Mar 23, 2026
653310e
Fix heap buffer overflow in FieldLZ fast decompression path (#544)
terrelln Mar 24, 2026
1bf8d24
C++: Expose Underlying ZL_Graph Object from SelectorState (#543)
felixhandte Mar 24, 2026
c9deb36
Add --trace and --trace-streams-dir flags to zli decompress (#545)
Victor-C-Zhang Mar 24, 2026
0c891d0
uncaught-exception (OpenZL error code: 50) in openzl::tests::componen…
Mar 24, 2026
a5423a2
Remove zl_dyngraph.h Header (#534)
felixhandte Mar 25, 2026
a4174b5
Remove zl_stream.h Header (#535)
felixhandte Mar 25, 2026
8aa89c6
Remove zl_cgraph.h Header (#536)
felixhandte Mar 25, 2026
089d2bb
Add split_byrange node: auto-detect range boundaries in numeric data …
Cyan4973 Mar 25, 2026
78342c9
fbcode/admarket/adlogger/parser/if/adlogger_parser.thrift (#548)
Mar 25, 2026
a42756b
Visualizer: Distinguish compression and decompression traces end-to-e…
Victor-C-Zhang Mar 26, 2026
989a54a
reverse the order of decompression graph population (#550)
Victor-C-Zhang Mar 26, 2026
adc4686
Add an SDDL2 integration test (#525)
daniellerozenblit Mar 26, 2026
599de0e
Share fillCSize between compress and decompress traces (#553)
Victor-C-Zhang Mar 27, 2026
d4c99eb
Decompress trace: add segmenter chunk support and fix regen codec nam…
Victor-C-Zhang Mar 27, 2026
3e56ff6
Share stream preview logic between compress and decompress traces (#555)
Victor-C-Zhang Mar 27, 2026
75757fb
Eagerly resolve error strings in trace codecs and graphs (#556)
Victor-C-Zhang Mar 27, 2026
89cfbde
Fix compressor deserialization crashing on deserializing special grap…
kevinjzhang Mar 27, 2026
7f9fd86
Add CBOR trace parser helper and smoke test for compression trace err…
Victor-C-Zhang Mar 27, 2026
d40da0a
Add specialized bitSplit decode fast paths for fp16/fp32/fp64 with un…
mmandina Mar 30, 2026
9a8afc3
Add E2E error propagation tests for compression tracing (#559)
Victor-C-Zhang Mar 30, 2026
b6916b9
Migrate trace CBOR serialization to new-style ZL_ERR error macros (#560)
Victor-C-Zhang Mar 30, 2026
2efd8ec
Migrate stream.c and decode_frameheader.c (#563)
terrelln Mar 30, 2026
848ad0f
Add function to attach graph context to error scope (#564)
terrelln Mar 30, 2026
8664b78
Add ZL_ERR_IF_ERR_COERCE (#565)
terrelln Mar 30, 2026
a7471fd
Migrate zip_lexer.c, custom decoders, and decompress2.c (#566)
terrelln Mar 30, 2026
665b2f4
Migrate compression core (#567)
terrelln Mar 30, 2026
120bac5
Migrate Parquet graph and custom transforms (#568)
terrelln Mar 30, 2026
7911f03
Migrate batch of codecs (#569)
terrelln Mar 30, 2026
ae74216
Migrate compression files (#570)
terrelln Mar 30, 2026
4f4d7e4
Migrate round trip tests (#562)
terrelln Mar 30, 2026
7d76eac
Migrate remaining tests/tools files (#574)
terrelln Mar 31, 2026
e9b5965
Migrate batch of codecs (#575)
terrelln Mar 31, 2026
fa78b00
Migrate batch of files (#577)
terrelln Mar 31, 2026
ebf2a68
Migrate error macros: custom parsers + C++ bindings (#576)
terrelln Mar 31, 2026
889cdb6
Migrate error macros: header files (#578)
terrelln Mar 31, 2026
f47117f
Migrate error macros: error test files (#579)
terrelln Mar 31, 2026
d0ca2b8
Delete old errors macros (#561)
terrelln Mar 31, 2026
0ac0665
Finish unifying private & public errors (#572)
terrelln Mar 31, 2026
7b4bdb5
add no stream preview flag (#546)
jlee303 Apr 1, 2026
2f94870
Fix header comments (#583)
terrelln Apr 1, 2026
48630e9
Add metadata in thrift node for clustering index (#585)
kevinjzhang Apr 1, 2026
f5a05ed
Poison stack arena in ASAN mode (#508)
terrelln Apr 1, 2026
d80583a
Refactor `processStream` (#510)
terrelln Apr 1, 2026
e7d85e0
split_byrange: optimization (#551)
Cyan4973 Apr 1, 2026
4dce9e4
Fix fuzz_graph.cpp (#587)
terrelln Apr 1, 2026
0b5a2e4
basic SHA256 implementation (#573)
Victor-C-Zhang Apr 2, 2026
2731c94
anti-inflaction act (#177)
Cyan4973 Apr 2, 2026
f41ae58
train-inline test: replace CSV sample with synthetic u16 zigzag (#582)
Cyan4973 Apr 2, 2026
457bacb
Add bitsplit_bf16 node (#590)
mmandina Apr 2, 2026
ee273e6
dict and bundle serialization/deserialization (#580)
Victor-C-Zhang Apr 2, 2026
43e71b5
tests for dict and bundle serialization/deserialization (#584)
Victor-C-Zhang Apr 2, 2026
35300ce
Fix fuzzing crash: catch formatVersion_unsupported in FuzzRoundTrip (…
Cyan4973 Apr 3, 2026
6aac0fd
truncate stream preview size (#581)
jlee303 Apr 3, 2026
5ab7c26
ThriftRemoveRefSuffix_openzl_dev_custom_transforms (#592)
Apr 6, 2026
eeb641a
introduce new materializer desc (#594)
Victor-C-Zhang Apr 6, 2026
9a3f89a
allow setting dictID on the encoder (#595)
Victor-C-Zhang Apr 6, 2026
e6968aa
merge cgraph_validation into cgraph (#596)
Victor-C-Zhang Apr 6, 2026
28d5e38
Skip graphs with no training samples (#600)
neiljohari Apr 7, 2026
0dc4c32
Move north-star v0.6 docs to subdirectory (#607)
daniellerozenblit Apr 8, 2026
9ba2874
Bump vite from 7.2.6 to 7.3.2 in /tools/visualization_app (#599)
dependabot[bot] Apr 8, 2026
51b7b8e
Remove F401 unused imports in fbcode//openzl/dev/doc/mkdocs/mkdocstri…
Apr 8, 2026
25facf5
Add float deconstruct nodes as ACE prebuilt compressor presets (#616)
mmandina Apr 9, 2026
e6ea0bf
Easy: Add legacy SDDL1 documentation section (#610)
daniellerozenblit Apr 9, 2026
4b60296
Add current-language documentation for supported SDDL2 features (#611)
daniellerozenblit Apr 9, 2026
ce6fc13
Easy: Update C API SDDL page to reference SDDL2 documentation (#612)
daniellerozenblit Apr 9, 2026
1de72f2
Add decoder_fusion module without hooking it up (#515)
terrelln Apr 9, 2026
0cf2934
Hook decoder fusion up to the decompression process (#516)
terrelln Apr 9, 2026
17df614
Add decoder fusion test cases (#517)
terrelln Apr 9, 2026
30aa243
Add ZL_GRAPH_PARTITION_BITPACK (#532)
terrelln Apr 9, 2026
8c688cd
Optimize partition encoding for 2-byte case (#533)
terrelln Apr 9, 2026
8b1aade
Add bitpack+partition decoder fusion (#538)
terrelln Apr 9, 2026
f1d8ae6
Modify chunk size flag to take standard suffixes (#614)
kevinjzhang Apr 9, 2026
fcdec9b
introduce CDictMgr, dict error codes, and compressor dict APIs (#605)
Victor-C-Zhang Apr 10, 2026
d84611a
resolve dict ID to bundle offsets during validation (#617)
Victor-C-Zhang Apr 10, 2026
24d18fc
tighten ZL_compressBound() with StoreOnExpansion premise (#588)
Cyan4973 Apr 11, 2026
eeacf6c
auto-segment large numeric inputs (#601)
Cyan4973 Apr 12, 2026
717b71c
Add source locations to all semantic analyzer errors (#623)
daniellerozenblit Apr 13, 2026
07244c6
Fix docs for logical ops (#627)
daniellerozenblit Apr 13, 2026
cb9bb50
Add bitwise operators to VM (#628)
daniellerozenblit Apr 14, 2026
782013b
write-stack-buffer-overflow (size 2) in decode4 (#632)
Apr 14, 2026
f885de0
Add ~16MB auto-chunking segmenter to XLDB int graphs (#602)
Victor-C-Zhang Apr 15, 2026
6a3888c
Update visualization transitive dependency (#621)
jlee303 Apr 15, 2026
2ffaab7
Set up component benchmarks (#634)
terrelln Apr 15, 2026
fd5411a
Add partition+bitpack benchmark (#635)
terrelln Apr 15, 2026
d12be86
Optimize bitpack+partition encoding for small inputs (#571)
terrelln Apr 15, 2026
c938be2
Add skill for codec creation (#636)
terrelln Apr 15, 2026
a20dee5
Allow getting error context in function graphs (#637)
terrelln Apr 15, 2026
cab31a7
plumb dicts from the ZL_Compressor to ZL_Encoder at compression time …
Victor-C-Zhang Apr 16, 2026
ce1518d
Add raw MParam blob storage to CDictMgr (#625)
Victor-C-Zhang Apr 16, 2026
4120229
deadly-signal in openzl::tests::ZStrongTest::testRoundTripMIImpl() (#…
Apr 16, 2026
032b4e5
uncaught-exception (OpenZL error code: 5) in ZL_Result_size_t_u::Valu…
Apr 17, 2026
7dc9d74
Add doxygen dependency to mkdocstrings-zstd tests (#649)
Victor-C-Zhang Apr 17, 2026
92a49f8
Fix silesia example (#648)
daniellerozenblit Apr 20, 2026
cab4b70
C++: Expose Function to Retrieve Starting Graph ID (#597)
felixhandte Apr 20, 2026
40c837c
C++: Take Const Shared Pointers in Custom Component Registration Func…
felixhandte Apr 20, 2026
06552a8
facebook-unused-include-check in decoder_fusion.c (#650)
Apr 20, 2026
0215d3d
cmake: disable upstream Google Benchmark self-tests (#647)
Cyan4973 Apr 20, 2026
7de28d4
Require parentheses for sizeof (#654)
daniellerozenblit Apr 20, 2026
cd4601b
deadly-signal in openzl::tests::ZStrongTest::testRoundTripMIImpl() (#…
Apr 20, 2026
38b071b
Modify directed selector to be serializable (#651)
kevinjzhang Apr 20, 2026
e3ad8e6
Add base graphs/node for empty input selector and thrift node (#652)
kevinjzhang Apr 20, 2026
fb87f75
Add sentinel codec (#638)
terrelln Apr 21, 2026
cab9b50
Only run Wheel tests on relevant code (#660)
terrelln Apr 21, 2026
3db3823
Add small lengths graph (#639)
terrelln Apr 22, 2026
45fc241
Add skill for the component registry tests (#640)
terrelln Apr 22, 2026
aad5f9b
LZ Codec (#661)
terrelln Apr 22, 2026
0f50fa5
Fix tests for multi-input nodes/graphs (#641)
terrelln Apr 22, 2026
4b499a1
Automatic chunking in SDDL (#644)
Cyan4973 Apr 22, 2026
41a96b4
Easy: Mark Arena's `realloc()` `noexcept` (#664)
felixhandte Apr 22, 2026
0cf5dfb
Wire --chunk-size through to parquet profile (#663)
Cyan4973 Apr 22, 2026
de927ed
Add MParam public usage API (#626)
Victor-C-Zhang Apr 22, 2026
e6d2009
Add MParam CBOR serialization and deserialization (#642)
Victor-C-Zhang Apr 22, 2026
3cd47b9
Add mux lengths codec (#662)
terrelln Apr 23, 2026
ef75200
Add ZL_GRAPH_LZ (#619)
terrelln Apr 23, 2026
36f31c7
Default the serial profile to ZL_GRAPH_LZ (#665)
terrelln Apr 23, 2026
73a844f
Optimize partition+bitpack decoder fusion (#624)
terrelln Apr 23, 2026
9b17323
Tune 4X threshold to match zstd (#630)
terrelln Apr 23, 2026
9bb8adf
facebook-unused-include-check in PartitionBitpack.cpp (#667)
Apr 23, 2026
6fee53a
Easy: [OpenZL] Add train target to openzl:openzl target (#668)
kevinjzhang Apr 23, 2026
27c752e
Add MParam integration test (#643)
Victor-C-Zhang Apr 23, 2026
5ba3264
Add parsing error as a category of OpenZL Errors (#653)
kevinjzhang Apr 23, 2026
02f2631
Return SDDL2_Error from SDDL2_kind_size and SDDL2_Type_size (#666)
daniellerozenblit Apr 24, 2026
b07da3d
Fix liblz4.dll path on Windows (#676)
Cyan4973 Apr 27, 2026
fbd5d1e
Stable Clustering for Optional Fields (#670)
daniellerozenblit Apr 28, 2026
dc89049
Easy: Convert TypeResult to struct (#671)
daniellerozenblit Apr 28, 2026
44b304c
Easy: Remove outdated Syntax.md documentation (#672)
daniellerozenblit Apr 28, 2026
94d1dd6
Change Record keyword to lowercase and remove = syntax (#673)
daniellerozenblit Apr 28, 2026
41d0e49
Update documentation for record declaration syntax change (#674)
daniellerozenblit Apr 28, 2026
62852de
Easy: Update SAO example files to new record syntax (#675)
daniellerozenblit Apr 28, 2026
9be9680
Stack-allocate ZL_Materializer, move struct to :dict, pass scratch ar…
Victor-C-Zhang Apr 28, 2026
5b542ee
Add content hash to ZL_Dict for dedup verification (#658)
Victor-C-Zhang Apr 28, 2026
781d397
Opt multi-input graphs out of random-graph fuzzing (#686)
terrelln Apr 28, 2026
f31e276
Fix make_canonical_parquet to return 0 on success (#685)
daniellerozenblit Apr 28, 2026
0ae8f3f
Require auto-sized arrays to be the last statement (#687)
daniellerozenblit Apr 29, 2026
cab01d6
Fix assertion in LZ decoding (#669)
terrelln Apr 29, 2026
a2565b8
Reduce schema/row ranges in parquet lexer fuzzer to fix timeout (#688)
daniellerozenblit Apr 29, 2026
7ba0695
Fix AFL initialization timeout (#690)
terrelln Apr 29, 2026
9ade2ee
Set 60 second timeout in our fuzzers (#691)
terrelln Apr 29, 2026
1fd2257
Use _Static_assert keyword instead of static_assert macro (#689)
Cyan4973 Apr 29, 2026
3db89cf
Fix compressor serialization generator failures (#693)
kevinjzhang Apr 29, 2026
3b9ec88
Adapt custom components in openzl to new component registration patte…
kevinjzhang Apr 30, 2026
1f89577
Enforce that segmenters produce at least one segment (#695)
terrelln Apr 30, 2026
eabdccf
openzl: codemod internal ZS2_ names to ZL_ (#700)
Cyan4973 Apr 30, 2026
f33f12b
Add settings panel to visualization (#615)
jlee303 Apr 30, 2026
cee3684
Add directional shortcuts to visualization (#620)
jlee303 Apr 30, 2026
ab25a6b
Add shortcuts for sorted traversal in visualization (#629)
jlee303 Apr 30, 2026
1deba9c
add enter to toggle expand/collapse (#677)
jlee303 Apr 30, 2026
c57fef6
Add node selection shortcut to visualization (#631)
jlee303 Apr 30, 2026
de07b7d
Fix serialization fuzzer (#703)
terrelln Apr 30, 2026
358c06d
Change `codecType` to `isCustomCodec` (#659)
Victor-C-Zhang Apr 30, 2026
f8844c0
Move private headers/components to the public API (#698)
Victor-C-Zhang Apr 30, 2026
3d575eb
Speed up OpenZLComponentFuzzer_* (#704)
terrelln Apr 30, 2026
7881501
Fix `-Wtypedef-redefinition` errors in public headers for C99 compati…
otegami May 1, 2026
fc997e9
print CLI version string based on the library version (#692)
Victor-C-Zhang May 1, 2026
1a4d612
ci: validate release tag matches zl_version.h before building release…
Victor-C-Zhang May 1, 2026
e42add4
Make the python version dynamic (#716)
njmei May 1, 2026
3b2d0a4
fix: use ZL_free instead of free for ZL_malloc-allocated memory (#702)
KuaaMU May 1, 2026
2c49d63
Stop using the serialized compressor in clustering training (#713)
terrelln May 4, 2026
cfb3424
Delete serialized graph overload of findAllGraphsWithPrefix (#714)
terrelln May 4, 2026
4f0c5bf
Add ZL_Compressor_overrideBaseGraph (#715)
terrelln May 4, 2026
1f1a45f
Handle missing repetition/definition levels (#717)
daniellerozenblit May 4, 2026
deb30f2
Add suffix-aware checked integer parsing and migrate CLI args (#699)
Victor-C-Zhang May 4, 2026
99ad66d
Add VS Code syntax highlighting extension for SDDL files (#722)
daniellerozenblit May 4, 2026
477ee0f
Add syntax highlighting section to getting started guide (#723)
daniellerozenblit May 4, 2026
506f2e9
Opt into longer initialization timeouts for all fuzzers (#719)
terrelln May 4, 2026
4918a3b
Reorganize SDDL examples into sddl/ and sddl2/ directories (#726)
daniellerozenblit May 4, 2026
e87029e
Fix fuzzer input generation issues (#720)
terrelln May 4, 2026
a591fd7
Fix allocation fuzzer issue (#721)
terrelln May 4, 2026
7e19db3
Introduce SDDL2 Result types (#725)
daniellerozenblit May 5, 2026
994db72
Bump postcss from 8.5.9 to 8.5.12 in /tools/visualization_app (#682)
dependabot[bot] May 5, 2026
6959466
Fix deadly-signal crash in CSV segmenter (#718)
daniellerozenblit May 5, 2026
935868a
Fix OOB column-chunk access when chunkRemaining hits zero (#732)
daniellerozenblit May 5, 2026
f014e51
Save ACE state inside compressor when flag is passed (#733)
kevinjzhang May 5, 2026
dad2d42
Add keyboard notif banner in visualizer (#724)
jlee303 May 5, 2026
7ee7066
Align numeric segmenter builder: chunkByteSize=0 means default (#734)
Cyan4973 May 5, 2026
c57e2f4
Add auto-segmentation to the serial profile (#730)
Cyan4973 May 6, 2026
da8f054
Fix xgboost MinGW build issue (#727)
jlee303 May 6, 2026
a20d339
Hook up partition graph to lz-research (#737)
terrelln May 6, 2026
fbc26fe
Fix xgboost Visual Studio build issue (#586)
jlee303 May 6, 2026
c6eb178
Fix flaky ParquetChunkedTest.test_chunk_size_affects_output (#736)
Cyan4973 May 6, 2026
972603c
Use default values in parquet fuzz harness when FDP is exhausted (#740)
daniellerozenblit May 6, 2026
858244e
Static assert 64-bit platforms (#739)
terrelln May 6, 2026
019fadc
SDDL2 Announcement (#741)
daniellerozenblit May 6, 2026
7f847ba
Fix csv segmenter fuzzer issue (#742)
kevinjzhang May 7, 2026
3dceb64
Bump library version to 0.2.0 (#745)
Cyan4973 May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
231 changes: 231 additions & 0 deletions .claude/skills/openzl-codec-design/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
---
name: openzl-codec-design
description: Design patterns and requirements for OpenZL codecs (located under `src/openzl/codecs/`). **USE AUOMATICALLY** when creating, modifying, or reviewing codecs in OpenZL.
---

# Creating or Modifying an OpenZL Codec

## Workflow for Creating a New Codec

If the user provides an input to this skill, interpret it as an **informal specification** of the codec they want to create. Before writing any code:

1. **Ask clarifying questions** about the format. Resolve ambiguities around input/output types, element widths, codec header layout, edge cases, error conditions, and whether the codec is public or private.
2. **Write `spec.md` first.** ALWAYS generate the decoder wire format specification (`spec.md`) before any other file. Follow the conventions of existing specs in `src/openzl/codecs/` (inputs, codec header, decoding algorithm, outputs).
3. **Ask the user to verify the spec.** Do NOT proceed with implementation until the user has reviewed and approved the `spec.md`. The spec is the contract — all code flows from it.

## Security

### Decoder MUST Be Safe to Malicious Inputs

The decoder processes untrusted data from compressed frames. All assumptions MUST be validated, especially:
- Bounds on sizes, counts, and offsets read from the frame header
- Element widths and stream types
- Buffer sizes before writing

Never trust values from the compressed stream without verification. A malicious frame must not cause crashes, out-of-bounds access, or undefined behavior.

### Encoder MUST Be Safe to Malicious Inputs

The encoder is processing data that the user provides. Unless explicitly stated otherwise all assumptions MUST be validated. Typcially, this is less of an issue on the encoder side, but any assumptions the encoder makes about the input data (e.g. it doesn't contain the value 0) must be validated, otherwise the data could be corrupted.

## Requirements

### General

- Codecs must work on big & little endian machines, and must not depend on endian-ness.
- Prefer to use helpers that already exist in `src/openzl/shared/`, rather than re-implementing them.
- Especially `openzl/shared/mem.h`, `openzl/shared/bits.h`, and `openzl/shared/utils.h`.
- All code MUST be portable across platforms. E.g. both ARM and x86-64, 32- and 64-bit systems, and both little- and big-endian.

### Bumping ZL_MAX_FORMAT_VERSION

When adding a new codec, or making a breaking change to a codec that requires bumping the format version, we need to make sure the development branch bumps the format version.
If not adding a codec or making a format breaking change to a codec, then you can skip this section.

Determine the production max format version from the `ZL_MAX_FORMAT_VERSION` macro in `fbcode/openzl/prod/include/openzl/zl_version.h`, call it `$prod_max_format_version`.
Determine the development max format version from the `ZL_MAX_FORMAT_VERSION` macro in `fbcode/openzl/dev/include/openzl/zl_version.h`, call it `$dev_max_format_version`.
If `$dev_max_format_version == $prod_max_format_version`, then the development `ZL_MAX_FORMAT_VERSION` in `fbcode/openzl/dev/include/openzl/zl_version.h` must be bumped.
This needs to be done before hooking up the encoder and decoder registry so that the new max format version is used during registration.

### Format Versioning

Codecs MUST preserve forward and backward compatibility with all supported format versions from `ZL_MIN_FORMAT_VERSION` to `ZL_MAX_FORMAT_VERSION`.
Codecs MAY change their format, with very careful consideration, but they MUST do it in way that preserves compatibility:

- `ZL_MAX_FORMAT_VERSION` must be bumped in the dev branch (see above)
- The `spec.md` file MUST be updated to reflect the variation based on the format version
- The encoder MUST check the format version with `ZL_Encoder_getCParam(eictx, ZL_CParam_formatVersion)` and only emit the new format for the latest format version
- The encoder MUST maintain the ability to emit the older format versions down to the minimum format version the codec supports
- The decoder MUST check the format version with `DI_getFrameFormatVersion(dictx)` and correctly interpret the encoded data based on the format version

While codecs are allowed to change their format, this is something that should only be done with extreme care, and done very rarely.
It should NEVER be done on a whim to fix a small issue.
Format versions will be supported for years, so every change compounds the maintainence burden of the code for years.

### Encoder Parameters

Parameters MUST be validated and cannot be trusted to match a particular format.
Parameters can come from a serialized compressor, which means that an attacker could control the serialized compressor, so all assumptions about parameters MUST be validated.
E.g. if a parameter is supposed to be an 8-byte uint64_t, then the size of the parameter MUST be validated to be equal to 8.

## Directory Layout

Each codec lives in `src/openzl/codecs/{codec_name}/`. A typical codec has these files:

```
{codec_name}/
encode_{codec}_binding.h # Encoder binding API + registration macro (EI_CODEC)
encode_{codec}_binding.c # Encoder binding implementation
encode_{codec}_kernel.h # Encoder kernel API (transportable, no openzl deps)
encode_{codec}_kernel.c # Encoder kernel implementation
decode_{codec}_binding.h # Decoder binding API + registration macro (DI_CODEC)
decode_{codec}_binding.c # Decoder binding implementation
decode_{codec}_kernel.h # Decoder kernel API (transportable, no openzl deps)
decode_{codec}_kernel.c # Decoder kernel implementation
graph_{codec}.h # [optional] Graph descriptor (I/O stream types)
spec.md # [optional] Human-readable decoder wire format spec
```

### Kernel vs Binding Split

**Kernel** = pure algorithm. Minimal deps (C standard library, `openzl/shared/`). No memory allocation. Must be independent of the OpenZL engine and transportable to other contexts. Publishes its own lean interface.

**Binding** = glue between kernel and OpenZL engine. Implements `ZL_Encoder`/`ZL_Decoder` interfaces. Handles pre-condition checks, error reporting, memory allocation, and kernel orchestration.

Simple codecs may skip the kernel and put everything in the binding. Complex codecs may have multiple kernel variants.

See `README.md` for the full conventions.

### Graph Descriptors

Define I/O stream types. Common reusable graphs in `src/openzl/codecs/common/graph_pipe.h`:
- `NUMPIPE_GRAPH(id)` — 1 numeric in, 1 numeric out (used by zigzag, delta, divide_by)
- `PIPE_GRAPH(id)` — 1 serial in, 1 serial out (used by lz4, zstd, rolz)

### spec.md

A human-readable specification of the decoder wire format: inputs, codec header format, decoding algorithm, and outputs. Written from the decoder's perspective.

## Encoder Binding Pattern

The encoder binding header declares the encode function and a registration macro:

```c
ZL_Report EI_{codec}(ZL_Encoder* eictx, const ZL_Input* ins[], size_t nbIns);

#define EI_CODEC(id) \
{ .gd = GRAPH_MACRO(id), \
.transform_f = EI_{codec}, \
.name = "!zl.{codec}" }
```

## Decoder Binding Pattern

```c
ZL_Report DI_{codec}(ZL_Decoder* dictx, const ZL_Input* in[]);

#define DI_CODEC(id) { .transform_f = DI_{codec}, .name = "!zl.{codec}" }
```

## Adding the Wire Format ID

In `src/openzl/common/wire_format.h`, add a new entry to the `ZL_StandardTransformID` enum before `ZL_StandardTransformID_end`. Use an available slot (look for gaps marked "available"). These IDs are serialized into compressed frames and must remain **stable forever**.

## Adding the Encoder Node ID

- **Public codecs**: Add to `ZL_StandardNodeID` in `include/openzl/zl_nodes.h` (before `ZL_StandardNodeID_public_end`)
- **Private codecs**: Add to `ZL_PrivateStandardNodeID` in `src/openzl/compress/private_nodes.h` (before `ZL_PrivateStandardNodeID_end`)

## Public C Header (`include/openzl/codecs/`)

For public codecs, create `include/openzl/codecs/zl_{codec}.h`:

1. Include `openzl/zl_nodes.h` (for nodes) or `openzl/zl_graphs.h` (for graphs)
2. Wrap in `extern "C"` guards
3. Add a comment block describing the codec's inputs, outputs, and behavior
4. Define the public ID macro:
- Nodes: `#define ZL_NODE_{CODEC} ZL_MAKE_NODE_ID(ZL_StandardNodeID_{codec})`
- Graphs: `#define ZL_GRAPH_{CODEC} ZL_MAKE_GRAPH_ID(ZL_StandardGraphID_{codec})`
5. Optionally define parameter IDs (`ZL_{CODEC}_PID`) and C API functions for parameterized codecs

Then add `#include "openzl/codecs/zl_{codec}.h" // IWYU pragma: export` to `include/openzl/zl_public_nodes.h`.

See existing headers in `include/openzl/codecs/` for examples (e.g., `zl_zigzag.h` for simple, `zl_partition.h` for complex).

## C++ Binding (`cpp/include/openzl/cpp/codecs/`)

Create `cpp/include/openzl/cpp/codecs/{Codec}.hpp`:

1. Include the corresponding C header (`openzl/codecs/zl_{codec}.h`)
2. Include C++ framework headers: `Compressor.hpp` and either `Node.hpp` or `Graph.hpp`, plus `Metadata.hpp`
3. Define the class in `namespace openzl::nodes` (or `openzl::graphs`):
- For simple 1-in 1-out nodes: inherit `SimplePipeNode<{Codec}>`
- For simple graphs: inherit `SimpleGraph<{Codec}>`
- For complex codecs: inherit `Node` or `Graph` directly
4. Declare `static constexpr NodeID node = ZL_NODE_{CODEC};` (or `GraphID graph = ZL_GRAPH_{CODEC};`)
5. Declare `static constexpr auto metadata = NodeMetadata<nInputs, nSingletonOutputs>{...};` with input/output types, names, and description
6. For parameterized codecs: add constructor taking config, override `parameters()`

Then add `#include "openzl/cpp/codecs/{Codec}.hpp" // IWYU pragma: export` to `cpp/include/openzl/cpp/Codecs.hpp`.

See `cpp/include/openzl/cpp/codecs/Zigzag.hpp` for a simple example, `cpp/include/openzl/cpp/codecs/Partition.hpp` for a complex one.

## Hooking Up the Registries

### Encoder Registry (`src/openzl/codecs/encoder_registry.c`)

1. Add `#include "openzl/codecs/{codec}/encode_{codec}_binding.h"`
2. Add entry to `ER_standardNodes[]`:
```c
REGISTER_TRANSFORM(ZL_StandardNodeID_{codec}, ZL_StandardTransformID_{codec}, ZL_MAX_FORMAT_VERSION, EI_CODEC),
```

NOTE: Do not use the macro `ZL_MAX_FORMAT_VERSION`, use the current value of that macro! This value tells OpenZL the minimum format version that is required to use this codec, which for new codecs is the current maximum format version.

### Decoder Registry (`src/openzl/codecs/decoder_registry.c`)

1. Add `#include "openzl/codecs/{codec}/decode_{codec}_binding.h"`
2. Add entry to `SDecoders_array[]` using the appropriate macro:
- `REGISTER_TTRANSFORM_G` — fixed typed I/O (most common)
- `REGISTER_VOTRANSFORM_G` — variable number of outputs
- `REGISTER_MITRANSFORM_G` — variable number of inputs
```c
REGISTER_TTRANSFORM_G(ZL_StandardTransformID_{codec}, ZL_MAX_FORMAT_VERSION, DI_CODEC, GRAPH_MACRO),
```

NOTE: Do not use the macro `ZL_MAX_FORMAT_VERSION`, use the current value of that macro! This value tells OpenZL the minimum format version that is required to use this codec, which for new codecs is the current maximum format version.

## Testing

### Adding a Test Component

See `tests/registry/README.md` and `tests/registry/OpenZLComponents.h` for instructions.

Steps:
1. Add enum value to `OpenZLComponentID` in `tests/registry/OpenZLComponents.h` (before `NumComponents`)
2. Add factory declaration `make${Component}Component()` in the `components` namespace
3. Add case to the `makeOpenZLComponent()` switch statement
4. Create `tests/registry/components/${Component}.cpp` implementing `OpenZLComponent`

Required overrides: `name()`, `minFormatVersion()`, `predefinedInputs()` (edge cases).
Optional overrides: `predefinedNodes()`/`predefinedGraphs()`, `generateInputs()`, `generateNodes()`/`generateGraphs()`.

Prefer using the C++ bindings (e.g., `nodes::Zigzag{}`, `graphs::Bitpack{}`) to create nodes and graphs in the test component rather than raw C API calls. Include from `openzl/cpp/codecs/{Codec}.hpp` and use `parameterize(compressor)` to build nodes/graphs.

See `tests/registry/components/Zigzag.cpp` for a simple example.

### Running Component Tests

```bash
buck test fbcode//openzl/dev/tests:integrationtest
```

### Running Component Fuzzers

Run fuzzers only after all tests pass. Run all 3 in parallel with a 10-minute timeout:

```bash
arc lionhead bundle run Zstrong_OpenZLComponentFuzzer_FuzzRoundTrip --run-duration-secs 600
arc lionhead bundle run Zstrong_OpenZLComponentFuzzer_FuzzCompress --run-duration-secs 600
arc lionhead bundle run Zstrong_OpenZLComponentFuzzer_FuzzDecompress --run-duration-secs 600
```
6 changes: 6 additions & 0 deletions .claude/skills/openzl-component-registry/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: openzl-component-registry
description: Design documentation for the OpenZL component registry located under tests/registry. **USE AUTOMATICALLY** whenever editing files under tests/registry/.
---

@../../../tests/registry/README.md
Loading
Loading