// use case
Indexer & DePIN warehousing
// Warehouse and replicate the firehose without the storage tax
Indexers and decentralized data networks warehouse decoded transactions — mostly repeated program IDs with a small tail of distinct arguments. The Transactions preset collapses the repeated part to a reference at level 3, so fewer bytes hit disk and fewer bytes cross the wire between replicating peers.
preset: Transactions reported ratio: 10–30:1
// why it fits
- ▸Decoded transactions are dominated by repeated discriminators and program IDs.
- ▸Level 3 keeps CPU cost low enough to compress on the ingest path.
- ▸The 10–30:1 range is an illustrative figure for transaction data, not a guarantee — benchmark your own.
- ▸Fewer bytes on the wire lowers replication bandwidth for DePIN storage and RPC networks.
- ▸No RPC or validator dependency — it operates purely on the bytes your indexer already holds.
// example
use blockchain_compression::presets::solana::{
SolanaCompressor, SolanaPreset,
};
use blockchain_compression::core::traits::CompressionStrategy;
let mut compressor = SolanaCompressor::new(
SolanaPreset::Transactions,
);
let compressed = compressor.compress(data)?;
let decompressed = compressor.decompress(&compressed)?;
assert_eq!(data, decompressed.as_slice()); See the quickstart for the full setup and the presets page for how ratios trade against CPU cost.