Skip to content
This repository was archived by the owner on May 2, 2026. It is now read-only.

fix(pair): swap brotli decoder for GZIPInputStream#10

Merged
filinvadim merged 1 commit intomainfrom
claude/compress-nodeauthinfo-CWZ4u
Apr 26, 2026
Merged

fix(pair): swap brotli decoder for GZIPInputStream#10
filinvadim merged 1 commit intomainfrom
claude/compress-nodeauthinfo-CWZ4u

Conversation

@filinvadim
Copy link
Copy Markdown
Member

Summary

The desktop frontend's brotli encoder ran into multiple browser-runtime issues (the brotli npm package's asm.js encoder crashes with Browser is not defined under WKWebView, and brotli-wasm needs an async WASM bootstrap that complicates the pipeline). The frontend has moved to gzip level 9 via pako.

Mirror the change here so the Android decoder matches the new wire format.

Change

  • QrPayloadCodec.kt: replace org.brotli.dec.BrotliInputStream with java.util.zip.GZIPInputStream (RFC 1952). GZIPInputStream ships with the JDK, so the transport module loses an external dependency.
  • Drop org.brotli:dec from app/build.gradle and gradle/libs.versions.toml.
  • Bump version to 0.0.69.

Pairs with

[Warp-net/warpnet#???] which swaps the desktop encoder from brotli to pako-gzip for the matching format.

Test plan

  • Re-pair the device against an updated fat node and confirm the JSON round-trips byte-for-byte (the pair handshake's token comparison in warpnet/core/handler/pair.go is byte-for-byte).
  • AAR is unaffected by this PR (no Go change).

https://claude.ai/code/session_011638L4REv78jEVUjQsniPz


Generated by Claude Code

The desktop frontend's brotli encoder ran into multiple browser-runtime
issues (the npm `brotli` package crashes with "Browser is not defined"
under WKWebView, and `brotli-wasm` requires async wasm bootstrapping
that doesn't fit cleanly into the existing pipeline). The frontend has
moved to gzip level 9 via pako.

Mirror the change here:
- QrPayloadCodec decompresses with `java.util.zip.GZIPInputStream` (RFC
  1952), which ships with the JDK so the transport module loses an
  external dependency.
- Drop `org.brotli:dec` from app/build.gradle and the version catalog.
@filinvadim filinvadim merged commit afe684b into main Apr 26, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants