Skip to content
Fourohtwo

Compress a string with gzip (RFC 1952) and return it as base64

agent402.tools/api/gzip

Compress a string with gzip (RFC 1952) and return it as base64. Reports input bytes, output bytes, and the compression ratio so you can decide if it was worth doing. Input can be plain text (utf8) or already-binary content (base64 or hex).

SolanaBaseUnchecked
POSThttps://agent402.tools/api/gzip

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agent402.tools/api/gzip", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"input":"hello hello hello hello hello hello hello","inputFormat":"utf8"}),
});
console.log(await res.json());

Example input

{
  "input": "hello hello hello hello hello hello hello",
  "inputFormat": "utf8"
}