BinaryReader
Vue de l’ensemble
‘BinaryReader’ est une classe dans Aspose.Font FOSS pour Python.
Remplacer une source byte dans le BytesIO recherchable pour la partage binaire de texte big-endian.
Cette classe fournit 20 méthodes pour travailler avec les objets de BinaryReader dans les programmes Python. Les méthodologies disponibles comprennent: __init__, read_bytes , read_cstring ; Read_f2dot14; Read_fixed : ‘read16_le،read_i32etred_ i8` .
méthodes
| Signature | Description |
|---|---|
| `init(source: bytes | io.IOBase)` |
tell() → int | Returns the current byte offset within the stream |
seek(offset: int, whence: int) | Moves the read cursor to the given offset using the specified whence |
remaining() → int | Returns the number of unread bytes left in the stream |
read_u8() → int | Reads an unsigned 8‑bit integer and returns it as int |
read_u16() → int | Reads a big‑endian unsigned 16‑bit integer from the underlying byte source and advances the read cursor |
read_u16_le() → int | Reads a little‑endian unsigned 16‑bit integer |
read_u32() → int | Reads a big‑endian unsigned 32‑bit integer |
read_u32_le() → int | Reads a little‑endian unsigned 32‑bit integer |
read_u64() → int | Reads a big‑endian unsigned 64‑bit integer |
read_i8() → int | Reads a signed 8‑bit integer |
read_i16() → int | Reads a big‑endian signed 16‑bit integer |
read_i16_le() → int | Reads a little‑endian signed 16‑bit integer |
read_i32() → int | Reads a big‑endian signed 32‑bit integer |
read_fixed() → float | 16.16 fixed-point → float. |
read_f2dot14() → float | 2.14 fixed-point → float. |
read_bytes(n: int) → bytes | Reads n bytes from the stream and returns them as bytes |
read_tag() → str | Read a 4-byte ASCII tag (e.g. |
read_pascal_string() → str | Read a Pascal-style length-prefixed string. |
read_cstring() → str | Read a null-terminated C string. |
Voir aussi
- Aspose.Font — référence API d’entreprise