Metadata-Version: 2.4
Name: avix-engine
Version: 1.0.0
Summary: AVIX: The Ultra-Premium Archival Trust Format with SHA-256 Integrity Sentry.
Home-page: https://github.com/escrawl/avix-engine
Author: Escrawl Products
Author-email: contact@escrawl.com
Keywords: image compression lossless avix archival medical medical-imaging
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.21.0
Requires-Dist: Pillow>=9.0.0
Requires-Dist: zstandard>=0.19.0
Requires-Dist: numba>=0.56.0
Provides-Extra: gpu
Requires-Dist: cupy>=10.0.0; extra == "gpu"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# AVIX: The Archival Trust Format
![AVIX Banner](https://via.placeholder.com/1200x300.png?text=AVIX+Engine+-+Mathematical+Integrity)

> The world's first mathematically verified, parallelized lossless image format.

**AVIX** (`avix-engine`) is an ultra-premium Python library engineered specifically for industries where data loss is physically unacceptable. Built for Medical Imaging (DICOM replacement), VFX Studio Archival, and Government Cold-Storage.

Unlike WebP, AVIF, or JPEG XL—which focus on lossy web delivery—AVIX is designed for absolute paranoia and multi-terabyte storage arrays.

## 🚀 Key Enterprise Features

* **🛡️ SHA-256 Integrity Sentry:** Every `.avix` file is sealed with a cryptographic 32-byte footer. If a hard drive suffers "Bit-Rot" over 20 years and flips a single pixel, the decoder throws a fatal Exception rather than silently loading corrupted medical or scientific data.
* **⚡ 100% CPU Unleashed (Multi-Threading):** Slices massive images into thousands of 1024x1024 chunks and processes them across all available logical CPU cores simultaneously using `concurrent.futures`.
* **🧠 Machine-Code Speed via Numba JIT:** Employs advanced mathematical spatial heuristics (`AVX2: Left`, `AVX3: Up`, `AVX6: Paeth Gradient`) compiled dynamically to LLVM 64-bit machine code upon first execution.
* **💾 mmap Kernel Streaming:** Decodes massive 8K+ images by directly mapping the hard drive file descriptor to the CPU cache, bypassing user-space RAM bottlenecks entirely.

## 📦 Installation

Install the engine via PyPI (Requires Python 3.8+):

```bash
pip install avix-engine
```

*For GPU acceleration (Hybrid VRAM mode), install the optional CuPy dependency:*
```bash
pip install avix-engine[gpu]
```

## 🛠️ Developer API

We provide a streamlined, minimalist API for integration into existing pipelines.

### Encoding (Archival Save)
```python
import avix

# Compress a PNG/EXR to a mathematically sealed AVIX archive
success = avix.encode('patient_scan_001.png', 'patient_scan_001.avix', mode='archival')
print(f"Archival Sealed: {success}")
```

### Decoding (Instant Memory Extraction)
```python
import avix

# Decode directly into a Pillow Image object via mmap streaming
try:
    img = avix.decode('patient_scan_001.avix')
    img.show()
except Exception as e:
    # If the file suffered Bit-Rot, it will be caught here instantly!
    print(f"CORRUPTION DETECTED: {e}")
```

### Instant Preview Extraction
```python
import avix

# Extract the embedded thumbnail in < 10 milliseconds without decoding the payload
thumb = avix.extract_thumbnail('massive_8k_texture.avix')
thumb.save('preview.jpg')
```

## 🧠 Why Not WebP or AVIF?

Formats built by Google and Apple are designed to save bandwidth on 4G networks by throwing away data the human eye can't see. **AVIX throws away nothing.** It is built to archive raw reality. If you are a hospital storing an MRI, or a VFX studio archiving a $100M film's raw textures, AVIX ensures the math you get out is the exact math you put in.

## 📄 License
This core mathematical engine is Open-Sourced under the MIT License by Escrawl Products.
