atlas-archive-core 1.1.0

High-performance compression library with adaptive context modeling (Loom) and .nyx archives
Documentation

Atlas-Archive

High-performance compression library with adaptive context modeling (Loom) and .nyx archives.

Crates.io License

Features

  • Adaptive Context Modeling (Loom): Learns data patterns for better compression
  • Parallel Processing: Uses Rayon for multi-core compression/decompression
  • Encrypted Pages: Optional Svalinn ChaCha20Poly1305 encryption
  • Low Memory: Paged LRU cache with disk swapping for large files
  • Privacy-First: All context data eligible for cryptographic hardening

Installation

# Library
cargo add atlas-archive-core

# CLI
cargo install --path atlas-cli

Quick Start

Library

use atlas_archive_core::{Compressor, Decompressor, LoomCompressor, LoomDecompressor, PlcConfig};

let config = PlcConfig::default();
let mut compressor = LoomCompressor::new(config.clone());
let mut decompressor = LoomDecompressor::new(config);

// Compress
let data = b"Hello, Atlas-Archive!";
let compressed = compressor.compress(data).unwrap();

// Decompress
let original = decompressor.decompress(&compressed, data.len()).unwrap();
assert_eq!(data.as_slice(), original.as_slice());

CLI

# Compress files into .nyx archive
atlas-archive compress -l 5 -t 4 file.txt -o output.nyx

# Decompress archive
atlas-archive decompress output.nyx -o ./extracted/

# List archive contents
atlas-archive list output.nyx

# Test archive integrity
atlas-archive test output.nyx

.nyx Archive Format

  • Magic: NYX\x01 (4 bytes)
  • Format: [MAGIC:4][entry_count:4][entries...]
  • Entry: [name_len:4][name][data_len:8][data]

Compression Modes

Mode Description Best For
LoomMode::Standard Full adaptive context Best ratio, slower
LoomMode::Paged Disk-backed, low RAM Large files
LoomMode::Off Static probabilities Speed, simple data

Performance

  • Parallel chunks: 64KB per chunk, 80% CPU cores
  • Batch weaving: Efficient context updates
  • Async I/O: 4 Tokio workers for disk operations

License

Licensed under either of:

at your option.