zetamarkets / sdk

SDK for accessing the Zeta program
Other
84 stars 29 forks source link

ZSTD compression for RPC websocket connections #290

Closed filipzeta closed 10 months ago

filipzeta commented 10 months ago

@solana/web3.js doesn't support different encodings so I made a fork: https://github.com/zetamarkets/zeta-solana-web3.js. It essentially just adds some code into connection.ts to seamlessly allow both base64 and base64+zstd encodings.

This PR allows for the use of a Connection object from that fork, and defaults everything to using base64+zstd for the encoding. CPU usage is minimally increased but network usage is 5-10x lower.