-
Notifications
You must be signed in to change notification settings - Fork 55
Support gzip
compression
#254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey! For the lite package could this perhaps utilize the Compression Streams API (which is still newly available but becomes mainline in November 2025), which would possibly allow not having to include the fflate dependency. On the backend side the API has been stable since Node v18 and Deno v1.19, with no support yet for Bun. If the API isn't available it could just fallback to no compression. If that sounds good I could perhaps work on this and submit a PR 👍 |
Could be part of https://github.com/PostHog/posthog-js-lite/tree/v5 (#468)
and fallback to no compression if not available.
yep, that's great. i'd love to see a PR. |
Is your feature request related to a problem?
When using
captureMode=form
, the compression islz64
(base64).When using
captureMode=json
, there's no compression.Describe the solution you'd like
When using
captureMode=json
, we could either usegzip
by default if possible, or offer another config to allow or not allow the gzip compression.JS SDK has an option
disable_compression: boolean
.Describe alternatives you've considered
Related sub-libraries
Additional context
Thank you for your feature request – we love each and every one!
The text was updated successfully, but these errors were encountered: