Skip to main content

Module api

Module api 

Source
Expand description

Public API for archive file access.

This module provides the high-level API for reading Hexz archives. It re-exports the main types used by applications and libraries to interact with .hxz files.

§Main Types

  • Archive: Main handle for reading archives
  • ArchiveStream: Logical stream identifier (Main or Auxiliary)
  • ArchiveManifest: Directory tree manifest for file-based archives

§Usage Example

use hexz_core::api::file::{Archive, ArchiveStream};
use hexz_store::local::FileBackend;
use hexz_core::algo::compression::lz4::Lz4Compressor;
use std::sync::Arc;

// Open an archive
let backend = Arc::new(FileBackend::new("data.hxz".as_ref())?);
let compressor = Box::new(Lz4Compressor::new());
let archive = Archive::new(backend, compressor, None)?;

// Read from main stream
let data = archive.read_at(ArchiveStream::Main, 0, 512)?;
println!("First sector: {:?}", &data[..64]);

Modules§

file
High-level archive file API. High-level archive file API and logical stream types.
manifest
Archive manifest for directory-based archives. Archive manifest for directory-based archives.