For context:
I have 2 projects of next.js and go respectively, previously I had a logic to compress some data in next.js backend (getServerSideProps) then send this data to next.js client side and decompress it but now I am migrating the backend to GO.
I used pako in older next.js backend but i'm unable to find a similar library in go

Can anyone please suggest any package which is available both in go and npm so that i can compress the data in go backend -> send it over network to next.js -> receive it in getServerSideProps in next.js -> receive compressed data in props on client side -> decompress it

1 Reply 1

According to the documentation paku just implements the widely supported zlib compression. So just use the go package which implements zlib, i.e. compress.zlib.

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.