Документация Python неофициальный перевод

binary.md

50 строк · 5.5 КБ · обычная страница · сырой текст · скачать

1> **Источник:** https://python-all.ru/3.5/library/binary.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# 7. Службы двоичных данных89Модули, описанные в этой главе, предоставляют некоторые базовые сервисные операции для работы с двоичными данными. Другие операции с двоичными данными, особенно связанные с файловыми форматами и сетевыми протоколами, описаны в соответствующих разделах.1011Некоторые библиотеки, описанные в [Службах обработки текста](https://python-all.ru/3.5/library/text.html#textservices), также работают либо с ASCII-совместимыми двоичными форматами (например, [`re`](https://python-all.ru/3.5/library/re.html#module-re)), либо со всеми двоичными данными (например, [`difflib`](https://python-all.ru/3.5/library/difflib.html#module-difflib)).1213Кроме того, смотрите документацию по встроенным двоичным типам данных Python в [Двоичные типы последовательностей – bytes, bytearray, memoryview](https://python-all.ru/3.5/library/stdtypes.html#binaryseq).1415- [7.1. `struct` – Интерпретация байтов как упакованных двоичных данных](https://python-all.ru/3.5/library/struct.html)1617  - [7.1.1. Функции и исключения](https://python-all.ru/3.5/library/struct.html#functions-and-exceptions)18  - [7.1.2. Строки формата](https://python-all.ru/3.5/library/struct.html#format-strings)1920    - [7.1.2.1. Порядок байтов, размер и выравнивание](https://python-all.ru/3.5/library/struct.html#byte-order-size-and-alignment)21    - [7.1.2.2. Символы формата](https://python-all.ru/3.5/library/struct.html#format-characters)22    - [7.1.2.3. Примеры](https://python-all.ru/3.5/library/struct.html#examples)23  - [7.1.3. Классы](https://python-all.ru/3.5/library/struct.html#classes)24- [7.2. `codecs` – Реестр кодеков и базовые классы](https://python-all.ru/3.5/library/codecs.html)2526  - [7.2.1. Базовые классы кодеков](https://python-all.ru/3.5/library/codecs.html#codec-base-classes)2728    - [7.2.1.1. Обработчики ошибок](https://python-all.ru/3.5/library/codecs.html#error-handlers)29    - [7.2.1.2. Кодирование и декодирование без состояния](https://python-all.ru/3.5/library/codecs.html#stateless-encoding-and-decoding)30    - [7.2.1.3. Инкрементальное кодирование и декодирование](https://python-all.ru/3.5/library/codecs.html#incremental-encoding-and-decoding)3132      - [7.2.1.3.1. Объекты IncrementalEncoder](https://python-all.ru/3.5/library/codecs.html#incrementalencoder-objects)33      - [7.2.1.3.2. Объекты IncrementalDecoder](https://python-all.ru/3.5/library/codecs.html#incrementaldecoder-objects)34    - [7.2.1.4. Потоковое кодирование и декодирование](https://python-all.ru/3.5/library/codecs.html#stream-encoding-and-decoding)3536      - [7.2.1.4.1. Объекты StreamWriter](https://python-all.ru/3.5/library/codecs.html#streamwriter-objects)37      - [7.2.1.4.2. Объекты StreamReader](https://python-all.ru/3.5/library/codecs.html#streamreader-objects)38      - [7.2.1.4.3. Объекты StreamReaderWriter](https://python-all.ru/3.5/library/codecs.html#streamreaderwriter-objects)39      - [7.2.1.4.4. Объекты StreamRecoder](https://python-all.ru/3.5/library/codecs.html#streamrecoder-objects)40  - [7.2.2. Кодировки и Юникод](https://python-all.ru/3.5/library/codecs.html#encodings-and-unicode)41  - [7.2.3. Стандартные кодировки](https://python-all.ru/3.5/library/codecs.html#standard-encodings)42  - [7.2.4. Кодировки, специфичные для Python](https://python-all.ru/3.5/library/codecs.html#python-specific-encodings)4344    - [7.2.4.1. Текстовые кодировки](https://python-all.ru/3.5/library/codecs.html#text-encodings)45    - [7.2.4.2. Двоичные преобразования](https://python-all.ru/3.5/library/codecs.html#binary-transforms)46    - [7.2.4.3. Текстовые преобразования](https://python-all.ru/3.5/library/codecs.html#text-transforms)47  - [7.2.5. `encodings.idna` – Интернационализированные доменные имена в приложениях](https://python-all.ru/3.5/library/codecs.html#module-encodings.idna)48  - [7.2.6. `encodings.mbcs` – Кодовая страница Windows ANSI](https://python-all.ru/3.5/library/codecs.html#module-encodings.mbcs)49  - [7.2.7. `encodings.utf_8_sig` – Кодек UTF-8 с сигнатурой BOM](https://python-all.ru/3.5/library/codecs.html#module-encodings.utf_8_sig)50