// use case
Block explorers
// Keep more of history on warm disk
As history piles up, explorers serve an ever-longer tail. Smaller stored size means more blocks stay on warm storage and fewer queries pay the cold-tier round-trip. Mixed is a safe default across transactions and account state, and its illustrative range is workload-dependent.
preset: Mixed reported ratio: 12–35:1
// why it fits
- ▸Serve historical queries without a cold-storage fetch when more data fits on warm disk.
- ▸Mixed handles a blend of transaction and account payloads without preset tuning.
- ▸Compression is a storage concern only — decompression on read returns exact bytes.
- ▸The library adds no chain dependency to your explorer stack.
// example
use blockchain_compression::presets::solana::{
SolanaCompressor, SolanaPreset,
};
use blockchain_compression::core::traits::CompressionStrategy;
let mut compressor = SolanaCompressor::new(
SolanaPreset::Mixed,
);
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.