binary.md
1> **Источник:** https://python-all.ru/3/library/binary.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Службы двоичных данных89Модули, описанные в этой главе, предоставляют некоторые базовые сервисные операции для работы с двоичными данными. Другие операции с двоичными данными, особенно связанные с файловыми форматами и сетевыми протоколами, описаны в соответствующих разделах.1011Некоторые библиотеки, описанные в [Службах обработки текста](https://python-all.ru/3/library/text.html#textservices), также работают либо с ASCII-совместимыми двоичными форматами (например, [`re`](https://python-all.ru/3/library/re.html#module-re)), либо со всеми двоичными данными (например, [`difflib`](https://python-all.ru/3/library/difflib.html#module-difflib)).1213Кроме того, смотрите документацию по встроенным двоичным типам данных Python в [Двоичные типы последовательностей – bytes, bytearray, memoryview](https://python-all.ru/3/library/stdtypes.html#binaryseq).1415- [`struct` – Интерпретация байтов как упакованных двоичных данных](https://python-all.ru/3/library/struct.html)1617 - [Функции и исключения](https://python-all.ru/3/library/struct.html#functions-and-exceptions)18 - [Строки формата](https://python-all.ru/3/library/struct.html#format-strings)1920 - [Порядок байтов, размер и выравнивание](https://python-all.ru/3/library/struct.html#byte-order-size-and-alignment)21 - [Символы форматирования](https://python-all.ru/3/library/struct.html#format-characters)22 - [Примеры](https://python-all.ru/3/library/struct.html#examples)23 - [Приложения](https://python-all.ru/3/library/struct.html#applications)2425 - [Родные форматы](https://python-all.ru/3/library/struct.html#native-formats)26 - [Стандартные форматы](https://python-all.ru/3/library/struct.html#standard-formats)27 - [Классы](https://python-all.ru/3/library/struct.html#classes)28- [`codecs` – Реестр кодеков и базовые классы](https://python-all.ru/3/library/codecs.html)2930 - [Базовые классы кодеков](https://python-all.ru/3/library/codecs.html#codec-base-classes)3132 - [Обработчики ошибок](https://python-all.ru/3/library/codecs.html#error-handlers)33 - [Кодирование и декодирование без состояния](https://python-all.ru/3/library/codecs.html#stateless-encoding-and-decoding)34 - [Инкрементное кодирование и декодирование](https://python-all.ru/3/library/codecs.html#incremental-encoding-and-decoding)3536 - [Объекты IncrementalEncoder](https://python-all.ru/3/library/codecs.html#incrementalencoder-objects)37 - [Объекты IncrementalDecoder](https://python-all.ru/3/library/codecs.html#incrementaldecoder-objects)38 - [Потоковое кодирование и декодирование](https://python-all.ru/3/library/codecs.html#stream-encoding-and-decoding)3940 - [Объекты StreamWriter](https://python-all.ru/3/library/codecs.html#streamwriter-objects)41 - [Объекты StreamReader](https://python-all.ru/3/library/codecs.html#streamreader-objects)42 - [Объекты StreamReaderWriter](https://python-all.ru/3/library/codecs.html#streamreaderwriter-objects)43 - [Объекты StreamRecoder](https://python-all.ru/3/library/codecs.html#streamrecoder-objects)44 - [Кодировки и Юникод](https://python-all.ru/3/library/codecs.html#encodings-and-unicode)45 - [Стандартные кодировки](https://python-all.ru/3/library/codecs.html#standard-encodings)46 - [Специфические для Python кодировки](https://python-all.ru/3/library/codecs.html#python-specific-encodings)4748 - [Текстовые кодировки](https://python-all.ru/3/library/codecs.html#text-encodings)49 - [Двоичные преобразования](https://python-all.ru/3/library/codecs.html#binary-transforms)50 - [Автономные функции кодеков](https://python-all.ru/3/library/codecs.html#standalone-codec-functions)51 - [Текстовые преобразования](https://python-all.ru/3/library/codecs.html#text-transforms)52 - [`encodings` – пакет кодировок](https://python-all.ru/3/library/codecs.html#module-encodings)53 - [`encodings.idna` – интернационализированные доменные имена в приложениях](https://python-all.ru/3/library/codecs.html#module-encodings.idna)54 - [`encodings.mbcs` – кодовая страница ANSI Windows](https://python-all.ru/3/library/codecs.html#module-encodings.mbcs)55 - [`encodings.utf_8_sig` – кодек UTF-8 с сигнатурой BOM](https://python-all.ru/3/library/codecs.html#module-encodings.utf_8_sig)56