Metadata-Version: 2.4
Name: pysifr
Version: 0.0.3
Summary: Arabic-first single-byte encoding with ASCII compatibility and native SIFR codec bindings
Author-email: Madyan Al-hajebi <m.alhajebi@gmail.com>
License-Expression: LicenseRef-SIFR-NonCommercial
Keywords: arabic,codec,encoding
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# SIFR Python Package

SIFR is a compact codec for Arabic text that maps Unicode codepoints to a byte representation.
This package provides thin Python bindings for the native SIFR C codec.

## Why this package?

- **Compact storage**: SIFR encodes Arabic text to a smaller byte stream than UTF-8 in many cases.
- **Fast round-trip**: Encode to bytes, decode back to codepoints quickly.
- **Simple API**: One `encode()` and one `decode()`.

> Note: SIFR is an **encoding**, not encryption. The output is binary data, not hidden text.

## Installation

pip install pysifr



## Basic Usage

```/dev/null/example.py#L1-12
from sifr import encode, decode

text = "السلام عليكم\n[EXT] ؐ ۖ ۝ ࣉ ࢠ"
cps = [ord(ch) for ch in text]

sifr_bytes = encode(cps)
back = "".join(chr(cp) for cp in decode(sifr_bytes))

assert back == text
