Quick Start: Your First smoltext Compression Call
Send your first payload through the smoltext compression API and measure the result.
What smoltext Does
smoltext is a compression API aimed at small, structured, text-heavy payloads — the kind of JSON, logs, and message blobs that move between services. This tutorial walks through a single compress-and-decompress round trip so you can see the API shape and verify the output is lossless.
Step 1: Get an API Key
Create a key from your dashboard. Keep it in an environment variable rather than hardcoding it; the docs at https://doc.sprapp.com show the recommended setup for several languages.
Step 2: Send a Payload
Make a POST request to the compress endpoint with your text body. For a first test, use a realistic sample — a chunk of JSON or a batch of log lines — rather than random bytes. Compression ratios depend heavily on the structure of real data, and random bytes will give you a misleadingly bad result.
Step 3: Inspect the Response
The response gives you the compressed payload and metadata including the original and compressed sizes. Compute the ratio yourself from those numbers so you understand exactly what you're getting on your data, not on a marketing average.
Step 4: Decompress and Verify
Send the compressed blob to the decompress endpoint and compare the output byte-for-byte with your original input. They should match exactly. smoltext is lossless; if they don't match, something in your encoding or transport is mangling bytes, and the docs at https://doc.sprapp.com cover common content-type pitfalls.
Step 5: Measure on Your Real Traffic
A single sample tells you little. Run a representative slice of your actual payloads through smoltext and look at the distribution of ratios. Some payloads will compress beautifully; some won't. That distribution is what you should base a decision on.
When This Is Worth Integrating
smoltext targets a specific niche: many small payloads where per-message overhead matters. If you're moving a handful of large files, a general-purpose archiver may serve you better. Be clear about which problem you have before wiring this into a hot path.
Next Steps
Once a manual round trip works, look at batching and streaming patterns in the docs at https://doc.sprapp.com, and decide where in your pipeline compression buys the most — usually at network or storage boundaries, not in memory.