BinaryWriter
Vue de l’ensemble
‘BinaryWriter’ est une classe dans Aspose.Font FOSS pour Python.
Accumuler les bytes pour la sérialisation de phonture binaire.
Cette classe fournit 19 méthodes pour travailler avec les objets de BinaryWriter dans les programmes Python. Les méthodologies disponibles comprennent: __init__, seek , ’telletto_bytes;write_bytes; writ_f2dot14 : 'writ_fixed . , Write _i16 ? , ‘writi_i18_le ! , ''writa_ i32. ,‘‘writo_a8., 'wri_padding ainsi que 7 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Pythone après l’installation du package d’Aspose.Font FOSS pour PyThone.
méthodes
| Signature | Description |
|---|---|
__init__() | Calls init on this BinaryWriter instance. |
tell() → int | Returns the current write position as an integer |
seek(offset: int) | Seek to an absolute position for back-patching. |
to_bytes() → bytes | Returns the accumulated binary data as a bytes object |
write_u8(v: int) | Writes an unsigned 8‑bit integer to the buffer |
write_u16(v: int) | Writes an unsigned 16‑bit integer in big‑endian order |
write_u16_le(v: int) | Calls write_u16_le on this BinaryWriter instance. |
write_u32(v: int) | Calls write_u32 on this BinaryWriter instance. |
write_u32_le(v: int) | Writes an unsigned 32‑bit integer in little‑endian order |
write_u64(v: int) | Calls write_u64 on this BinaryWriter instance. |
write_i8(v: int) | Writes a signed 8‑bit integer to the buffer |
write_i16(v: int) | Writes a signed 16‑bit integer in big‑endian order |
write_i16_le(v: int) | Calls write_i16_le on this BinaryWriter instance. |
write_i32(v: int) | Calls write_i32 on this BinaryWriter instance. |
write_fixed(v: float) | 16.16 fixed-point. |
write_f2dot14(v: float) | 2.14 fixed-point. |
| `write_bytes(data: bytes | bytearray)` |
write_tag(tag: str) | Write a 4-character ASCII tag. |
write_padding(n: int) | Write n zero bytes. |
Voir aussi
- Aspose.Font — référence API d’entreprise