"""
RBSP Core Protocol — public API.

This package provides the foundational building blocks of the Resonance-Based
Semantic Protocol:

    - ``NaturalSignature``      Immutable content fingerprint (encoding.py)
    - ``SignatureGenerator``    Produces natural signatures (signature.py)
    - ``SignatureRegistry``     O(1) signature store with persistence (registry.py)
    - ``PerfectHashTable``      Static O(1) lookup table (registry.py)
    - ``BloomFilter``           Probabilistic membership test (bloom.py)
    - ``CountingBloomFilter``   Bloom filter with deletion (bloom.py)
    - ``LSHIndex``              Approximate nearest-neighbor index (lsh.py)
    - ``MinHasher``             MinHash signature computation (lsh.py)
    - ``RoaringBitmap``         Compressed bitmap for doc ID sets (roaring.py)
    - ``SkipList``              Fast sorted posting list (skiplist.py)
    - ``rbsp_hash``             The core RBSP hash function (signature.py)
"""

from rbsp.core.encoding import NaturalSignature, compute_size_class
from rbsp.core.signature import SignatureGenerator, rbsp_hash, rbsp_hash_text
from rbsp.core.registry import SignatureRegistry, PerfectHashTable
from rbsp.core.bloom import BloomFilter, CountingBloomFilter
from rbsp.core.lsh import LSHIndex, MinHasher, ngram_shingles, word_shingles
from rbsp.core.roaring import RoaringBitmap
from rbsp.core.skiplist import SkipList
from rbsp.core.synonyms import SynonymMap
from rbsp.core.fst import FST, FSTBuilder
from rbsp.core.cache import LRUCache, SegmentCache
from rbsp.core.compress import (
    compress,
    decompress,
    compress_string,
    decompress_string,
    CompressedStore,
    BatchCompressor,
)
from rbsp.core.levenshtein import (
    edit_distance,
    edit_distance_threshold,
    damerau_levenshtein,
    DamerauLevenshtein,
    FuzzyMatcher,
)

__all__ = [
    # Encoding
    "NaturalSignature",
    "compute_size_class",
    # Signature generation
    "SignatureGenerator",
    "rbsp_hash",
    "rbsp_hash_text",
    # Registry
    "SignatureRegistry",
    "PerfectHashTable",
    # Bloom filters
    "BloomFilter",
    "CountingBloomFilter",
    # LSH
    "LSHIndex",
    "MinHasher",
    "ngram_shingles",
    "word_shingles",
    # Roaring bitmaps
    "RoaringBitmap",
    # Skip list
    "SkipList",
    # FST
    "FST",
    "FSTBuilder",
    # Synonyms
    "SynonymMap",
    # Levenshtein / fuzzy matching
    "edit_distance",
    "edit_distance_threshold",
    "damerau_levenshtein",
    "DamerauLevenshtein",
    "FuzzyMatcher",
    # Compression
    "compress",
    "decompress",
    "compress_string",
    "decompress_string",
    "CompressedStore",
    "BatchCompressor",
    # Cache
    "LRUCache",
    "SegmentCache",
]
