The Hidden Economics of Making Files Smaller
A smaller file is not always a cheaper file.

An archive that will sit for a year and a file that will be read a hundred times this week may have the same compression ratio. Their bills will look different. One pays for bytes that remain on disk. The other pays repeatedly to move them or turn them back into useful data.
Compression trades computation for less storage or transfer. To decide whether the trade pays, follow one copy through its lifetime. Start with the cost of encoding it, then ask how long it will live and what happens each time someone needs it.
What the file costs over time
For a dataset with a fixed number of identical retrievals, start with a simple bill. Add the one-time encoding cost, storage cost over the retention period, and the number of retrievals multiplied by the cost of each one. Apply the same accounting to the baseline. If reads vary in size or route, sum their individual costs or model them in groups (Figure 1).
Fig. 01
When does each cost arrive?
Open a stage to see what belongs in the comparison.
Encode once
Count the compute to create the compressed copy, plus any setup this workload needs. If many files share a dictionary, record how it’s built and spread its delivery or storage cost across the files that actually use it.
Store over time
Multiply retained bytes by a storage rate and duration. Account for copies, minimum billed sizes and retention rules where they apply.
Retrieve on demand
Count read requests, retrieval charges, transfer along the actual route, and decoding. The service that stores the compressed bytes and the service that sends a response may see different sizes.
Storage pricing pages can list requests, retrieval, and data transfer separately. Check the region, storage class, route, and applicable billing units before applying a rate. Record which charges change when the file size changes and which are tied to the number of requests. [1]
When compression pays
Compress a hypothetical 100 GB dataset to 50 GB. At an assumed $0.02 per GB-month, the smaller copy saves $1 per month. If encoding costs $3 and all other costs are equal, three months of storage savings pay for the encoding. That result changes as soon as you give retrieval its own entry in the bill (Figure 2).
Fig. 02 / Interactive
Where is the break-even point?
Compare 100 GB as-is with 50 GB compressed. Storage costs US$0.02 per GB-month and encoding costs US$3.
| Cost | As-is | Compressed |
|---|---|---|
| Encode | $0.00 | $3.00 |
| Storage | ||
| Retrievals | ||
| Total |
With no difference in retrieval cost, the 50 GB copy saves US$1 a month and breaks even after three months. In this model, transferring the compressed bytes and decoding afterward saves US$0.30 per retrieval; decoding before transfer adds US$0.20 per retrieval.
Notice where decoding happens. If compressed bytes cross the metered link and decode afterward, the smaller wire payload can offset some of the decoding cost. If the service decompresses the file first and sends the same 100 GB either way, the transfer bill stays the same. The stored copy still costs less per month, but each decode pushes the break-even point further out.
Bytes and waiting time
A lower bill can come with a slower response. Consider a saved file that is transferred first and decoded afterward. On a slow link, sending fewer bytes can save enough time to cover decoding. On a fast link, the same decode time can dominate. If transfer and decoding overlap, measure the actual time to usable output instead of simply adding their durations (Figure 3).
Fig. 03 / Interactive
Can the transfer savings cover decoding?
Send a 1 GB file as-is, or send 0.5 GB and decode after the download. Both copies are already stored.
| Stage | As-is | Compressed |
|---|---|---|
| Transfer | ||
| Decode | 0 s | |
| Total |
With 40 seconds of decoding, the compressed copy is ready in 200 seconds at 25 Mbps, against 320 seconds as-is. At 100 Mbps both take 80 seconds.
Energy belongs in its own column too. CPU time measures how long work occupied a processor. Energy measures how much was used. If the cost model converts energy into dollars, state the measurement scope and electricity rate, and check whether the compute price already includes that cost.
How to investigate it
Pick a workload with known retention and access patterns. A collection of rarely fetched backups and a heavily read distribution bundle make a useful pair. Measure each codec on representative inputs before applying any prices.
- Measure the codec. Record input and compressed sizes, encode and decode time, and compute or memory usage on the hardware you intend to use. Verify that the decoded bytes match the originals.
- Describe the workload. Record retention, retrieval counts, the fraction of each file actually read, and where decoding happens. Track latency at the point the user can use the data.
- Version the assumptions. Save prices, billing units, region, date, and any rules for requests, transfer, and minimum retention. State how you allocate costs shared by multiple files. [2]
- Vary what might change. Sweep retention, read volume, network throughput, and rates. Report where the decision changes and which assumptions move it most.
This is a proposed experiment. A reproducible report would include the input manifest, software versions and settings, raw observations, price assumptions, and verification criteria.
What this means
A cold archive and an interactive download can justify different compression settings for the same bytes. Compare the costs you pay once with the ones you pay each month or on every read. Then check whether the result still meets the time and resource limits of the workload.
Choose a compression setting for the life the file will actually have.
References and further reading
- Amazon Web Services. Amazon S3 pricing, including storage, requests, retrieval and transfer.
- FinOps Foundation. FinOps Framework.
