from collections.abc import Iterator
from pydicom import config as config
from pydicom.filebase import DicomBytesIO as DicomBytesIO, DicomIO as DicomIO, ReadableBuffer as ReadableBuffer
from pydicom.misc import warn_and_log as warn_and_log
from pydicom.tag import ItemTag as ItemTag, SequenceDelimiterTag as SequenceDelimiterTag, Tag as Tag
from typing import Any

def parse_basic_offsets(buffer: bytes | bytearray | ReadableBuffer, *, endianness: str = '<') -> list[int]: ...
def parse_fragments(buffer: bytes | bytearray | ReadableBuffer, *, endianness: str = '<') -> tuple[int, list[int]]: ...
def generate_fragments(buffer: bytes | bytearray | ReadableBuffer, *, endianness: str = '<') -> Iterator[bytes]: ...
def generate_fragmented_frames(buffer: bytes | bytearray | ReadableBuffer, *, number_of_frames: int | None = None, extended_offsets: tuple[list[int], list[int]] | tuple[bytes, bytes] | None = None, endianness: str = '<') -> Iterator[tuple[bytes, ...]]: ...
def generate_frames(buffer: bytes | ReadableBuffer, *, number_of_frames: int | None = None, extended_offsets: tuple[list[int], list[int]] | tuple[bytes, bytes] | None = None, endianness: str = '<') -> Iterator[bytes]: ...
def get_frame(buffer: bytes | bytearray | ReadableBuffer, index: int, *, extended_offsets: tuple[list[int], list[int]] | tuple[bytes, bytes] | None = None, number_of_frames: int | None = None, endianness: str = '<') -> bytes: ...
def fragment_frame(frame: bytes, nr_fragments: int = 1) -> Iterator[bytes]: ...
def itemize_fragment(fragment: bytes) -> bytes: ...
def itemize_frame(frame: bytes, nr_fragments: int = 1) -> Iterator[bytes]: ...
def encapsulate(frames: list[bytes], fragments_per_frame: int = 1, has_bot: bool = True) -> bytes: ...
def encapsulate_extended(frames: list[bytes]) -> tuple[bytes, bytes, bytes]: ...
def __getattr__(name: str) -> Any: ...
