from collections.abc import Callable
from typing import Any

from ...boc.builder import Builder

def pad(src: str, size: int) -> str: ...
def remove_prefix_map(src: dict[str, Any], length: int) -> dict[str, Any]: ...
def find_common_prefix(src: list[str]) -> str: ...
def fork_map(src: dict[str, Any]) -> tuple[dict[str, Any], dict[str, Any]]: ...
def build_node(src: dict[str, Any]) -> dict[str, Any]: ...
def build_edge(src: dict[str, Any]) -> dict[str, Any]: ...
def build_tree(src: dict[int, Any], key_size: int) -> dict[str, Any]: ...
def write_label_short(src: str, to: Builder) -> Builder: ...
def label_short_length(src: str) -> int: ...
def write_label_long(src: str, key_length: int, to: Builder) -> Builder: ...
def label_long_length(src: str, key_length: int) -> int: ...
def write_label_same(value: bool, length: int, key_length: int, to: Builder) -> None: ...
def label_same_length(key_size: int) -> int: ...
def is_same(src: str) -> bool: ...
def detect_label_type(src: str, key_size: int) -> str: ...
def write_label(src: str, key_size: int, to: Builder) -> None: ...
def write_node(src: dict[str, Any], key_size: int, serializer: Callable[..., Any], to: Builder) -> None: ...
def write_edge(src: dict[str, Any], key_size: int, serializer: Callable[..., Any], to: Builder) -> None: ...
def serialize_dict(src: dict[int, Any], key_size: int, serializer: Callable[..., Any]) -> Builder: ...
