Skip to content

Brotli compression - #1

Merged
carlohamalainen merged 11 commits into
mainfrom
carlo/brotli01
Oct 9, 2026
Merged

carlohamalainen merged 11 commits into
mainfrom
carlo/brotli01

Conversation

@carlohamalainen

Copy link
Copy Markdown
Collaborator

@saviorand Here's a prototype of Brotli compression.

I decided to vendor in the Brotli C source and wrote a minimalist FFI wrapper just for compression of streams. This gives us complete control over the library version, interface, and parameters. I think the same approach will work for zstd and zlib.

I hand wrote the C FFI and Lean code in the library.

Claude wrote all the tests - I vibed it with "We aspire to Richard Hipp level of testing as he does with SQLite."

@carlohamalainen
carlohamalainen marked this pull request as draft October 7, 2026 23:36

@saviorand saviorand left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a few points inline.

Comment thread README.md Resolved
Comment thread datastar-brotli/c/datastar_brotli.c Resolved
Comment thread datastar-brotli/vendor/brotli/README.md Resolved
Comment thread datastar-brotli/README.md Resolved
Comment thread .vscode/c_cpp_properties.sample.json Resolved
Comment thread datastar-brotli/c/datastar_brotli.c Resolved
@carlohamalainen carlohamalainen mentioned this pull request Oct 9, 2026
@carlohamalainen
carlohamalainen merged commit c0b6811 into main Oct 9, 2026
8 checks passed
@carlohamalainen
carlohamalainen deleted the carlo/brotli01 branch October 10, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants